Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more

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
0 answers
16 views

Springy / Stretchy rope

I have a 2D rope cutting game similar to cut the rope, and I want to add ropes that can be extended further than if it laid flat. Easy said: I want to stretch the rope. Currently I have a parent game ...
CheckerT's user avatar
0 votes
0 answers
22 views

UI Button is not working

I have a problem on the canvas. When I remove the camera in the FPS Controller player and UnChecked the FPS Controller it works but when the Camera is inside the the FPS Controller I can't click ...
Christian James Calambro's user avatar
0 votes
0 answers
31 views

Why is SRP batcher breaking GPU Instancing?

So I was making this demo scene where there are tons of shells(green little rectangles), and they come from a prefab with shader and material that supports GPU instancing. But when I check the ...
Bobo's user avatar
  • 1
0 votes
0 answers
27 views

Friction effect occasionally not applied

I'm developing a racket-ball behavior, the expected behavior is similar to a realistic tennis racket and ball, meaning both velocity and ang. velocity should be precisely applied when the ball "...
Omer Simchoni's user avatar
0 votes
1 answer
17 views

The WebGL version of my game does not load the next scene when using an async action

I've just created a WebGL build for my puzzle game in Unity. While the Windows version worked just fine, I encountered a bug on the web: it cannot load the next level when you collide with the goal. ...
Nghia Tran's user avatar
1 vote
1 answer
51 views

How can I simulate locking or limited-slip differentials in Unity?

I have been developing a racing game in Unity for a few months and I can't find any information on how to simulate a car differential. Right now I just split the torque generated by the engine 50-50 ...
Jorge Cambero Mogena's user avatar
0 votes
0 answers
34 views

ReleaseInstance is not deleting the object instantiated from an Addressable

I have this simple script, which is working perfectly when I press I and it instantiates an addressable game object. But I am not sure why it is not deleting it when I press D. I confirmed that on ...
Muhammad Faizan Khan's user avatar
0 votes
1 answer
37 views

is it possible to render world space canvas over other objects in unity?

for some pickable object, I display a UI canvas. It's attached to a scene gameObject. Sometimes the Canvas UI overlaps with some other objects. I need to make sure the UI is always renderer on top of ...
virtouso's user avatar
  • 2,628
0 votes
0 answers
21 views

FirebaseReference.GetValueAsync() in Unity Not Completing

I'm working on a Unity project where I use Firebase to manage user data. I am encountering a recurring issue where the asynchronous task GetValueAsync() does not ...
Jose Lopez's user avatar
1 vote
0 answers
34 views

Have black screen after build game on web gl

Good day. Everything works fine for me on the unity stage, but as soon as I start the game, after the unity screensaver I get a black screen with an interface, what to do, please help. My console <...
Kozyr's user avatar
  • 11
1 vote
1 answer
35 views

how can I distance camera according to player speed?

How can I make the camera move further away from the player according to player's speed? So, the camera is at default distance, but when the player catches a boost (increases speed), the camera ...
jukvox's user avatar
  • 13
0 votes
1 answer
50 views

Chain cutting swipe input skips over chains

I have a game where you need to cut chains, similar to Cut The Rope. I want to develop it for Android, so I need mobile controls. For detecting swipes I used ...
CheckerT's user avatar
0 votes
1 answer
89 views

Why doesn't Coroutine work the way I want with if blocks?

I'm making a game and when the enemy dies I keep it in memory. I want the person playing to find the game just as they left it when they enter. I'm doing most of these, but there's one small problem ...
Volkan AKDAG's user avatar
0 votes
0 answers
43 views

Google Play Games integration issue: Returning an error code

I'm using Play Games for Unity plugin to work with GPGS. https://github.com/playgameservices/play-games-plugin-for-unity But every time I tried to authenticate, it failed with these error messages: <...
modernator's user avatar
  • 1,213
0 votes
0 answers
26 views

Is there a way to rename prefab in unity by cuting a specific part of the name?

I have a lot of old prefabs in unity that should get renamed, doing this by hand would take a while. I there a way to cut the names and save them. I would like it to go from cutpart_2_goodpart to ...
Ivan's user avatar
  • 337
0 votes
3 answers
62 views

How to make camera follow player on Y+ axis only

My player is jumping on sticks, endlessly going upwards, and if they fall, it's game over. I want the camera to follow the player only when they move up (ie. only on Y axis), not down. If they move ...
jukvox's user avatar
  • 13
3 votes
2 answers
589 views

How do I check if a GameObject is touching another GameObject in Unity?

I am trying to check if a GameObject is clicking another GameObject. I am trying to make a 2D shooter like Duck Hunt so this is important. I have tried ...
ok-coder1's user avatar
0 votes
1 answer
42 views

Image over everything Unity

I want to create a UI for a VR game to use it as a loading screen, the scene has a camera an image, a text mesh and a loading icon, the image is the background and the text and loading icon should be ...
Alejandro's user avatar
0 votes
0 answers
36 views

Precalculate Rigidbody movement in Unity

Is there a way to precalculate movement from a Rigidbody in Unity and show this with a line renderer for example? I want to make a physics based marble game and show the path the marble is going to ...
CheckerT's user avatar
0 votes
0 answers
40 views

About Json format and Player Prefs [duplicate]

I'm making an Offline RPG game in Unity. I want to save some things in my game. I have heard of two recording systems for this, one is PlayerPrefs and the other is to save in json format. PlayerPrefs ...
Volkan AKDAG's user avatar
0 votes
0 answers
33 views

Compensate bullets direction towards direction player is moving in

My new prototype is a top down shooting game, the player aims with the mouse and fires projectiles towards the mouse position, this works fine, when the player is standing still. When the player moves,...
Mad Hatter's user avatar
0 votes
1 answer
37 views

I need multiple custom game objects to stick to a parent object

A bit of a newb to Unity & game development. I have built a very basic lunar lander ship and made some RCS thrusters out of cubes and cylinders to attach to the fuselage of the ship. However, ...
Skittles's user avatar
  • 103
0 votes
0 answers
56 views

bad position of contact points :why?

...
kaloprat's user avatar
  • 111
1 vote
0 answers
23 views

How do I get a Unity Job to update external data?

I'm relatively new to Unity, and I wanted to use the Job system for a complex pathfinding algorithm, since it will likely be used alongside multiple instances of NPCs attempting to find a valid route. ...
Jason Li's user avatar
0 votes
0 answers
23 views

How to visualize the shadowmap as the renderTarget of the main camera in Unity?

I have a Unity project with the builtin pipeline. I would like to save the shadowmap of the directional light source and visualize on screen as the primary renderTarget of the main camera. ...
Fox1942's user avatar
  • 121
0 votes
2 answers
70 views

Splatoon like gun in Unity

I want to create a 3D Top Down Battle Royale game in Unity and wanted to add a mechanic to color the floor, walls and ceiling, just like in Nintendo game Splatoon. I know that you can color a 3D shape ...
CheckerT's user avatar
0 votes
0 answers
28 views

How could I generate a large 3D mesh from a 2D texture at runtime?

I have a simple black and white texture, where white is a biome, and black is outside of the biome. I want to create a mesh at runtime that is the same shape as the white region and has a ...
Noah Vanilla's user avatar
0 votes
1 answer
26 views

scale and rotate a cube automatic the cube is never scaling and rotating to the end. how to fix?

the scaling and rotating both are working. if the automatic flag bool is false and i press the G key each time i can see that the cube is scaling and rotating to the end for example if it's rotating ...
Daniel Lip's user avatar
  • 1,747
0 votes
2 answers
27 views

two colliders for same trigger are conflicting

I'm trying to detext when player goes inside and exit this house. As the picture shows I need two colliders because the house is not an exact rectangle. So I added two box colliders to an empty ...
anderlaini's user avatar
0 votes
1 answer
19 views

light difference between scenes on player model

Here is a screenshot of same model on different scenes. I'm trying to understand why the second one has that bright/light and remove it. I want the model appear like the first picture. Is this a ...
anderlaini's user avatar
1 vote
0 answers
84 views

Particle Effect, which works in the editor, does not work on Android

Hello everyone and good work. In my game, my character has a sword and a shield, and as I increase their level, they emit colorful steam. I add the particle effect of this vapor with code, and after ...
Volkan AKDAG's user avatar
0 votes
2 answers
35 views

Unity LookAt says reference not set but it is

This is my code ...
Alejandro's user avatar
0 votes
2 answers
52 views

Add round edges to heptagon shaped image with fill in Unity

I am not sure if this is possible I have this image: This is how it looks when I do radial fill: My question is if there is a way to make edges rounded while filling the image. Rough sketch of what ...
Ivan's user avatar
  • 337
2 votes
1 answer
67 views

How to set up high-performance collisions for level geometry in Unity?

I'm new to Unity. I was wondering what the best workflows were for placing colliders. I'm going for high performance, and I've heard that mesh colliders aren't as performant as just placing down box ...
Taylor Goeman's user avatar
0 votes
1 answer
54 views

Skybox doesn't get displayed on mobile Chrome in Unity WebGl

In my webgl build skybox is completely purple on mobile Chrome browser but works fine on PC and mobile firefox. Is there any fix for this? Edit: This is my skybox material and I didn't do anything ...
Ivan's user avatar
  • 337
-1 votes
1 answer
68 views

Linerender material is distorted

...
John's user avatar
  • 13
0 votes
1 answer
30 views

How do I move both the child & parent game objects at the same time?

My current code is: ...
Saltii's user avatar
  • 1
0 votes
1 answer
56 views

Animation Clip Won't Play Despite Transition Showing in Animator

I'm following this Unity Animation Rigging tutorial by TheKiwiCoder. What I have now is a rig layer containing all kinds of constraints. The tutorial instructs to add an animator to this rig layer and ...
pond's user avatar
  • 3
3 votes
1 answer
80 views

Automated playtesting in a 2D platformer

For a hard 2D platformer I'm working on, I want to make an automated playtesting system. The goal is to allow every level to be tested in parallel as part of an automated test suite. These tests would ...
crass_sandwich's user avatar
0 votes
0 answers
26 views

How to implement flexible, deformable shapes?

I'm making a top-down, 2D wargame that simulates large numbers of troops fighting. Instead of taking the Total war approach and modelling each soldier individually, I represent them as 1000-man ...
DeeCeptor's user avatar
  • 255
0 votes
2 answers
70 views

Type or namespace name 'Collider' could not be found

I asked Mail.RU how to make a script so that when an object is touched, the game will restart. They sent me this: ...
лис 3's user avatar
0 votes
1 answer
45 views

In Unity, the character's spine position reference changed after I put something into its hand

The situation can be illustrated by a few pictures. here is a character After i put a gun under his right hand As you can see, when I select spine.003, its position is now located at the gun. When I ...
pond's user avatar
  • 3
1 vote
2 answers
46 views

Different Spacing of all Children Grid Layout Group

I am creating a top down 2D game, and I am creating randomized triangles on the ground. Such as this: This is to enhance the "knowledge" that you are moving. But it certainly doesn't look ...
sammyiscuul's user avatar
0 votes
1 answer
122 views

How can I securely store Gmail SMTP credentials in a Unity project to comply with security guidelines?

I am currently working on a Unity Asset that involves sending emails using Gmail's SMTP server. As part of the setup, developers using the asset are required to input their email address and the ...
Ch.Muhammad.Bin.khalid's user avatar
0 votes
0 answers
56 views

Buttons in a scroll view not working

I have created a scroll view in Unity, and wanted to make the elements inside clickable. It would function as a level select menu. The level panels are instantiated from a prefab. As a first approach ...
CheckerT's user avatar
9 votes
2 answers
4k views

Avoiding string literals to reduce memory allocations

In Unity, should we avoid string literals in frequently executed methods (like Update()) to avoid unnecessary memory allocations and instead store string values ...
Srdjan Pazin's user avatar
3 votes
1 answer
36 views

Compiling Unity to WebGL gives a Node ESM module error

I'm trying to build my multiplayer game to WebGL in Unity (using Mirror). However, when I press "build", it gives me the following three errors: ...
kalilamodow's user avatar
0 votes
0 answers
36 views

Why do my shaders render differently in the simulator?

I am using simple shaders on the cards in my game. The shader is assigned as a material to a white image the covers the whole card. They render as intended in the scene view, but do not in IOS ...
Devin's user avatar
  • 1
0 votes
0 answers
46 views

Unity Audio plays with 5-10 second delay

I have wanted to make something like a rhythm game for Android in Unity, and for that I needed to write an audio manager to play my songs and sound effects in-game. I have followed Brackeys' tutorial ...
CheckerT's user avatar
0 votes
1 answer
64 views

Why are my angle calculations not working properly?

I am using this code: ...
Stan's user avatar
  • 3