Questions tagged [unity]

Unity is a cross-platform game creation system that focuses on easy art pipeline process. It consists of a game engine and an integrated development environment. The game engine's scripting is built on Mono.

Filter by
Sorted by
Tagged with
0
votes
0answers
17 views

Choosing between Playmaker or Game Creator for a non-coder [closed]

The Unity Asset Store is having a huge sale today and saw these two featured. I'm trying to create a one-level third-person horde mode shooter. It would spawn in at least 3 different enemy types that ...
0
votes
0answers
10 views

Playmaker or Game Creator (non-coder) [closed]

Just found out the Unity Asset Store is having a huge sale today and found these two featured in the announcement. I'm trying to just create a 1 level Third-person horde mode shooter. Spawn in at ...
-1
votes
1answer
16 views

How do I enable/disable a gameobject from a different Script?

I wanted a shield around my player when my player picks it up. Now shield component is a child of object of player which is disable at start. I wanna enable it from the shield prefab. This is all in ...
0
votes
0answers
10 views

How can I calculate the inertia tensor of a hollow object defined by a triangle mesh?

I want to calculate the mass, center of mass, and inertia tensor of player created objects. Some of the objects will be hollow instead of solid. I am creating a closed triangle mesh for their object. ...
0
votes
0answers
20 views

How to model walkable houses for Unity

I created a house in blender which is a big cube with the upper face intended and pulled down back to the ground. The floors are other boxes and windows and doors are cut out using a boolean modifier. ...
0
votes
1answer
20 views

Saving settings when exiting the application

I created a static class CustomPlayerPrefs, it has a WriteToDisk() method that writes the saves to disk. For saving I am using Application.quiting event: ...
1
vote
1answer
44 views

InvalidOperationException: Collection was modified; enumeration operation may not execute

I think it's just my eyes get blured after seen this so many hours. Maybe new ones will see the problem. I'm making a puzzle game and I need to glue parts with each others. And here's how I make it: <...
0
votes
0answers
13 views

The tile cursor is not on the same tile I selected

Here is the image, when I select the tile I want to paint, it paints in the correct box where I want it to be but the white cursor should also be in the same box but it is 2 units to the left? This ...
0
votes
1answer
24 views

Starting a Coroutine after another Coroutine ends

I have a method that fades the screen to black, then fades away back again using coroutines but I couldn't get the 2nd part to work. FadeToBlack() works if I put <...
1
vote
0answers
17 views

ECS - Stats, damage-types & damage calculation

Prologue Im quite new to data oriented programming and my goal is to implement a runescape stats & damage mechanic. This is quite a pretty complex topic : [Runescape-Mechanics][1] and i havent found ...
-1
votes
1answer
48 views

If player is not holding the ladder then it should not jump twice

I am using Unity2d and I am stuck with a problem. I made the new layer for ground and ladder and add (OverlapCircle) and make double jump script for the player, so if the player touches the ground or ...
0
votes
0answers
23 views

How can I change the curved meeting points in my waypoints system so it will be updated in run time?

The post is a bit long but all the scripts are connected. I have a simple waypoints system. The first script is moving along LineRenderer line/s positions : ...
0
votes
2answers
44 views

Humanoid Retargetting: Number of frames in LateUpdate is not the same as frames in animation

I need to play an animation in such a way that each frame is for sure being played and not skipped. Why? I want to transfer an animation from 1 model to another. One model is Humanoid, the other one ...
0
votes
0answers
18 views

How to colour blend between two materials?

I've been trying to get a material (with an image texture) to animate towards a colour mix with transparency, but either I'm attempting something the wrong way, or unable to find the right keyword to ...
0
votes
1answer
17 views

Measure a distance point to point in unity3D?

I tried to measure a distance point to point on my phone screen by using following code ...
0
votes
1answer
18 views

Path solving for a game with a similiar pathing mechanic to Anno

I cant quite wrap my head around how to solve pathing in my game. The basic premise is you will place buildings and roads on a 2d field and then you will be able to create routes from one building to ...
0
votes
0answers
8 views

Hardcode per-instance properties into the shader in unity

I am using one of the packages from the asset store and using its Polyline feature for wire rendering. There are thousands of wires and its taking much fps/Batch ...
0
votes
1answer
37 views

Problems creating a biomes map

I am working on an infinite procedural terrain generator and at the moment I am trying to generate a proper heightmap from a biomes map. I'm not sure what is the best way in creating a proper biomes ...
0
votes
0answers
18 views

how can i create a snake with a single piece look

I want to create a 3d snake with a single piece look, i have tried separate head and body parts following each other with Vector3.SmoothDamp but some quaternion issues occurred (when y axis >90, ...
0
votes
1answer
16 views

pause Menu only working in one scene and not in others

Hi I'm working on a game for a school project but I'm still pretty new at game dev, I decided to add a pause menu to my game but for some reason, it only works in one of the scenes in unity, and I can'...
0
votes
1answer
12 views

Move object to mouse direction without raycast?

I have script moving object to mouse postion using raycast. But what I need now is use the mouse movement to move my object. ...
0
votes
0answers
18 views

How do I correct the turning effects on my car in order for it to turn properly?

In my game, I'm currently working on a Physics-based car driving game in Unity from scratch. My problem is that whenever I press the input controls used for turning, instead of turning, my car does ...
0
votes
1answer
19 views

Change value in arrays in array [closed]

The title might be confusing and I don't think this short explanation is 100% accurate, but I will try my best to show the problem. So I have this hierarchy: And I want to change "measureOfTime&...
0
votes
0answers
33 views

How do I stop gyroscope-controlled camera from jittering when holding phone still?

I have here a simplified version of my gyro-controlled camera with a sensitivity modification (a side effect of increasing sensitivity is that the jitteriness is exacerbated). ...
0
votes
1answer
34 views

How to handle movements of objects in a platformer with a cylindrical map?

I was wondering what would be the best approach for a game with a perspective like Resogun, where the world wraps around in a cylinder: In my opinion, the easiest approach is to: have a "...
0
votes
1answer
43 views

How do I program procedural generation with objects that must fit together in specific ways?

I'm working on a game where I have to procedurally generate a large open room building. I'm using Unity, but I think this applies to any engine. The room is made up of different wall segments. What ...
1
vote
2answers
39 views

Free movement in a 3D isometric world

I'm currently experimenting with movement in a isometric perspective world and i'm thinking about how the movement should work. The movement can be either by WASD or gamepad. Since the player can ...
0
votes
0answers
12 views

Unity scene preview keyboard controls

I am learning to use Unity, and found I disliked the way moving around the scene editor is implemented. The left and right arrow keys move the scene "camera" left and right as expected, but ...
0
votes
0answers
19 views

How to implement Vector3.MoveTowards follow with random movement

I want to implement an AI behavior where an enemy runs towards the player while sidestepping randomly and aggressively (like in this video: https://www.youtube.com/watch?v=35Ut_C4eL40) Currently I am ...
0
votes
0answers
7 views

Fade a texture effect as it nears the end of a cylinder mesh

In my game I have a laser beam that travels for about 15m, but abruptly stops due to the mesh the texture is attached to. How can I setup my shader graph so that the end of the texture fades away? I ...
0
votes
0answers
8 views

How to add some organization to my PSD Imported image with bones generated by the Skin Editor

I have an Image in PSB format imported using the PSD Imported and I have generated bones using the Sprite Editor > Skinning Editor, all good. The problem is that when I try to add some organization ...
0
votes
0answers
18 views

Should the interaction between the player and world objects be handled from the player class or as an event from the object classes?

Suppose you're making a 3D platformer like Super Mario, if you jump on a Goomba, does Mario (the class) know that it just landed on a Goomba and then tell that Goomba to die, or does the Goomba ...
0
votes
0answers
10 views

Make a child sprite match the layer ordering of its parent

I have my project settings set up to order the sprites' visual layering based on their y position. If I add a sword as a child to my character, the sword won't have the same order as the parent so ...
0
votes
0answers
16 views

Unity Runtime Surface Snapping (Like Shift+Cntrl in Editor)

I am trying to allow the user of my VR game to move objects around using a pointer, then when holding down a button, snap to a grid and align to the highest surface, essentially replicating the Editor ...
0
votes
0answers
14 views

How can I make the transform to rotate facing the moving direction the transform move?

The goal is to make the transform to rotate smooth when the moving direction is change. In this case there are some cubes and the cubes facing direction the blue axis is not the same as the transform ...
2
votes
1answer
46 views

8-way aiming in run 'n' gun

I am developing a 2D run 'n' gun game in Unity and am having an issue getting the aiming to "feel right". Some background: The player can aim in 6 directions when running (left, right, and ...
0
votes
0answers
12 views

Nearest Vector3 to Vector3 from last frame

Suppose you have a Vector3 provider of pointcloud positions that update every frame - call it Nullable<NativeSlice<Vector3>> pointClouds Say you want to ...
1
vote
1answer
47 views

Method subscribed to an event is called twice for every time the event is raised

I am trying to make an inventory system in Unity with ScriptableObjects and a text driver that displays the contents of an inventory. So far the code looks like this: -An InventoryObject is defined as ...
0
votes
0answers
11 views

I imported a blend file into unity which contained 3 animations but I can only see one [Unity] and I need three

I can only see one in unity: But there are three in blender: I thank thee answers.
0
votes
1answer
41 views

How do I detect if my object is grounded?

I am trying to detect when an object is grounded. My script right now is: ...
0
votes
0answers
15 views

(Unity Engine) Is it possible to make 2d animation bones perfectly straight within the sprite editor

I am experimenting with pixel perfect camera and 2d animation. I noticed in the skinning editor that there is no option to edit bone coordinates. When I make an ik it extended the arm making it ...
-1
votes
0answers
18 views
0
votes
0answers
7 views

Unity Rendering Pass Before Refraction not showing

In the documentation it states: Before Refraction: Draws the GameObject before the refraction pass. This means that HDRP includes this Material when it processes refraction. To expose this option, ...
0
votes
1answer
26 views

How to teleport a game object to an empty game object?

I am trying to make a respawn system where if the player touches a plane, (the name of the object is tutlvl1_flrdead) they get teleported to an empty object at player spawn named "RESPAWN". ...
0
votes
3answers
53 views

Sticking the Rigidbody2D player to a moving platform without parenting & transform fiddling

I have a player entity with Rigidbody2D component and I have a moving platform which is a kinematic Rigidbody2D. Player movement is done by setting it's velocity (...
0
votes
0answers
6 views

ParticleSystem: Start Color > Random between two Colors, but without interpolation?

How can I set up a Particle System to use a random Color from a selection of two? I mean choosing one or the other.. not a random Color in-between these two. I tried to use the option Start Color > ...
1
vote
1answer
15 views

DOTween: How to make a spring bounce effect?

I am looking how to make a bouncing effect with DOTween, like when the object is attached to a spring. How can I make an effect like this?
0
votes
0answers
6 views

Retain Position and Scale Values of Render Texture Canvas Elements to another Canvas

Now the title might not be able to express the entirety of the question but here's my problem. In my main scene I have a camera and a canvas in overlay mode, let's call this "View A". In ...
0
votes
0answers
25 views

How to optimize Floor Meshes with different material in unity

I have several meshes (floor tiles) that consist of unique materials as they have different textures. I see that it is taking too many batches and it has around 100m vertexes. Is there any way to ...
0
votes
1answer
17 views

Unity - One time grab token in scene

So let's say I have a project that contains 100 scenes or levels. Each scene contains a token (some coin or diamond) that can only be grabbed once. If the player takes the token in level N and replays ...

1
2 3 4 5
277