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
8 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
7 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
28 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
13 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
0answers
12 views

Navmesh agent doesn't collide with colliders

I have a simple game similar to Fall guys, I created a couple of enemies that traverse the platforms and avoid the obstacles using Navmesh. There are also moving obstacles(at constant speed) enemies ...
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
15 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
15 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
28 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
31 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
39 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
36 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
10 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
18 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
17 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
11 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
43 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
11 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 ...
0
votes
0answers
23 views

Unity build fail because the something keeps changing “targetSdkVersion” to 25 although I already set targetSdkVersion to 26 before the build?

I am building a project in Unity 2019.4 for Android. The Unity build fails and some errors are as follows: ...
1
vote
1answer
46 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
36 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
14 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
17 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
25 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
2answers
47 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
14 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
15 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
vote
1answer
46 views

Mission system for a FPS game to force the player into following the storyline

Lately I've been working on a FPS game with a storyline in unity and I've encountered something that has been making my head explode for days. My objective is to be able to force the player to do a ...
0
votes
0answers
19 views

Overlay the human model for virtual fit-on

For virtual fit-on how can I overlap a dress in an customize avatar to show how it's fit for him
0
votes
0answers
19 views

Why isn't occlusion culling working correctly?

Occlusion culling doesn't seem to be behaving the way I was expecting. I've set the yellow wall as static and have baked an occlusion map using the occlusion window in unity. However when visualising ...
0
votes
1answer
27 views

How to instantiate cubes at every given positions [closed]

I have a list of coordinates in 3D (XYZ) list = {{226.29, 485.28, 345.396}, {298.292, 108.226, 551.422}, {452.987, 164.874, 416.242}, {562.8, 29.4951, 297.651},{-610.087, -99.9056, -156.377}, {470....
0
votes
1answer
27 views

How do I activate a game action when a UI button is held?

I want to make my button do stuff when the player holds it. In this case, I want to make a grab function: when the button is down the character can grab objects, but if the button is up they do not ...
0
votes
1answer
64 views

Refactoring fighting game Movement class responsibilities

I'm a web developer, new to C# and trying to learn Unity. I've learned the C# syntax, I understand how to write working code, although I'm having a hard time understanding when and to what classes ...
0
votes
0answers
15 views

Return statement not working unless it's in the same method [closed]

I have a method that runs a dialog when a button is pressed and I need that button to stop activating after certain turns. So I made this method: ...
0
votes
1answer
12 views

Unity 2019 Error : com.unity.xr.arsubsystems@2.2.0-preview.3/Runtime/ImageTrackingSubsystem/XRImageTrackingSubsystem.cs57,30): error CS0506:

I am opening an old project created in 2019.3 inside my new Unity 2019.4. I got this error message in Unity Console: ...
0
votes
0answers
6 views

fade/transparence for object by shader graph?

I'm trying to make a simple fade/transparence for my object using shader graph. I got a result with dither but I don't like it. I want something smooth without dots. How to get it?
0
votes
1answer
22 views

Unity ScriptableObject Conversation Dialogue and Reading

I'm unsure as to how I would reference a scriptable object's variables within a struct from another class. I know I'd have to make a public Conversation, but I'm ...
0
votes
1answer
15 views

Problem importing Blender materials into Unity via FBX

I've created a simply low poly house in Blender (2.92) that I have imported into Unity as an FBX. Materials (simple colours) are all set up in Blender. Initially this was all working fine. Colours all ...
0
votes
1answer
18 views

Mark positions of spawnpoint in editor

I am creating a digital boardgame, which consits of muliple boards, between which the gamepieces are moved by the players. The script of the game board needs a 2D array of positions to know where to ...
0
votes
1answer
19 views

The gun becomes invisible while running the game, how do I fix it?

The gun is visible in game view but not visible while running the game, this problem started occuring when I set the gun as the child of the main camera.

1
2 3 4 5
277