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
11 views

Enemy Indicator shows both front and back

I made a simple enemy indicator which show image over the game object which look like this: You can see that red exclamation mark is over the cube. Note that Canvas is Space Screen Camera, so I had ...
0
votes
1answer
13 views
0
votes
0answers
8 views

Can I use trilinear filtering for my sprites, but keep their outlines unfiltered?

Suppose that I have two images of equal size. They both contain a square: https://i.stack.imgur.com/BI62X.png https://i.stack.imgur.com/Nev5Z.png When overlapped, both squares will appear next to ...
0
votes
1answer
11 views

Unity3D in WebGL the Player doesn't have animations

I using Unity 2019.2.14f1 to create a simple 3D game. I want to build the project for WebGL, but, even though the player has animations on Unity, in the web the Player doesn't have animations even ...
0
votes
1answer
27 views

Unity getting Input from UI

So I'm trying to get a script of mine to pass information to another static class being used for saving files as I've been told I wouldn't want that script to be instantiated. So I used a separate ...
0
votes
3answers
47 views

How to store information into the tile?

I have made a map via TilePallete tool. Now I want to store information in certain tile. How I can do this? ForEx: I'm hittin a certain tile and I need it to have info about health remaining. For ...
1
vote
1answer
17 views

Unity URP - Batching GPU instanced objects with same material/mesh not working

I have 100 units (exact same prefab) on screen. The material is a URP Lit using a texture with GPU instancing enabled. Why is it not batching? Am I missing something? I also noticed it requires 3-4 ...
0
votes
0answers
11 views

Unity blocked after changing Time region

I reinstalled Windows then Installed Unity. Then I changed my timezone from US Pacific to Europe where I actually live. Unity got blocked: "Expired licence" even though I use the free version. https://...
0
votes
0answers
34 views

How can I implement ground clamping across slopes in my 2D collision controller?

I'm working on improving my 2D collision controller, but am having trouble with "ground clamping" when my object moves past certain slopes on which it should be descending. The controller takes the ...
0
votes
0answers
17 views

How would I access my list from Update function? [duplicate]

The DFT function below works fine but I want to use the list, generated from that function, in the Update function. ...
0
votes
0answers
13 views

Unity3d: “random” transform position values on editor

Run into some strange behavior on editor position values. https://youtu.be/DUBpbOUkbfo As you can see we have two cube object with colliders on both and rigidbody on parent. After start play mode ...
0
votes
2answers
52 views

How to figure out that I'm onto ice tile?

It might be very silly question but serfing for two hours still can't find an answer. I'm trying to replicate battle city. I've made level with TileMap. But can't figure out how to know that my tank ...
0
votes
2answers
21 views

Unity3D playing sound when Player collides with an object with a specific tag

I using Unity 2019.2.14f1 to create a simple 3D game. In that game, I want to play a sound anytime my Player collides with a gameObject with a specific tag. The MainCamera has an Audio Listener and ...
0
votes
0answers
18 views

How can I places objects to specific facial landmarks ? like ears and hats

I'm currently trying multiple AR plugins in unity and I'm stuck in how to place certain objects in specific landmark positions. I used the landmark positions to spawn certain objects but they are way ...
0
votes
0answers
19 views

Starting a new game in the main menu is working and pausing/unpausing the game while playing is working why the resume is not working?

The script GameController is on one GameObject and it's controlling the pausing and resuming the game : ...
0
votes
1answer
31 views

Rotate an object on itself, from one random Quaternion to another

I have a situation: I have a 3D object in the world. let's say a sphere. I have 2 random directionnal vector: vector A, and vectorB: My question is: How to I rotate over time my object, from A to B ? ...
0
votes
1answer
50 views

How can I move my player on exact x and y coordinates, like on a grid?

I'd like to implement movement exactly like it is done in this game. (You can see it in action on YouTube.) I need my Player to always stay in the center of X and Y similar to grid movement, but with ...
0
votes
0answers
37 views

Animate Vertex LineRenderer

How can animate property of a GameObject when that property isn't on the animation window? Or How Can I add a property that isn't on the animation window by default? For example I like to able to ...
1
vote
1answer
29 views

How to scale player as they travel between 2 points

I'm doing a VR Project where the player walks down a hallway. The player starts with a size of 10 and is supposed to scale down to a size of 0.5 (well the GameObject in which all the player stuff is ...
0
votes
2answers
26 views

Unity - Rotating X on camera changes result of ScreenPointToRay completely

I am using ScreenPointToRay to draw a Line along my Mouse drag. My code for getting my mouse position looks like so: ...
0
votes
1answer
28 views

Can I add non-trees to terrain.terrainData.treeInstances on Unity 3D?

I need to create a brush in which there will be stones, poles, bushes and other elements of the environment. I bought a Prefab Brush. Whether it is possible to add the objects that I draw on the ...
0
votes
0answers
16 views

Call code on interrupting Unity animator sub-FSM

I'm trying to find a way to execute a code when one of two outcomes happens in Unity animator controller: When animator's sub-FSM finishes or When animator's sub-FSM is "interrupted" by a ...
2
votes
0answers
26 views

My unity game fails to open in my mobile

I'm new to Unity, and want to make a android game. I made a very simple scene: A sphere A cube (floor) A simple script that moves the sphere by touch. I tried it with unity remote and it works fine....
0
votes
0answers
10 views

Steamworks NET fails to initialize in very few cases with Unity

Unity 2019.2.8f1 Steamworks NET 13.0.0 Steamworks SDK 1.46 Steamworks API DLL Version 05.25.65.21 Mono scripting backend .NET Standard 2.0 My standalone Unity ...
0
votes
1answer
46 views

How I start a over a new game using a ui button logic code?

My Hierarchy have 3 main GameObjects : Game Data where all the gameplay objects are stored as childs of the Game Data GameObject. Main Menu and all objects of the main menu stored as childs under the ...
1
vote
1answer
23 views

Unity scene has phantom models in every scene new and existing a like even when deleted

I have asked about this over at Unity Forums but have not got a response yet. My issues is that in the image below all there is is a light source but several of my monster models are in the scene ...
1
vote
0answers
57 views

Compute Shader Race Condition

Edit: will i have better chances for an answer with this question on Stackoverflow / computer graphics stackexchange and should i move it? I am still stuck here.. I'm trying to transform a texture ...
0
votes
0answers
23 views

Why the script icon in the Assets looks like a gear?

In my Unity Assets catalogue, I see this: And the script : ...
0
votes
1answer
5 views

Unity - Set rotation of object using angle between two points?

I have a LineRenderer that draws a line between two points, Vector3 startPos and Vector3 endPos. How can I get the angle between these points, and apply it to an objects transform rotation, so that it ...
0
votes
1answer
40 views

Why is Instantiate spawning too many clones?

just at a bit of an impasse with this one if anyone can help. I am developing an endless runner, and I am trying to instantiate my obstacle prefabs by having my player go through a trigger which ...
0
votes
0answers
25 views

Cannot build Android IL2CPP for Unity

Everything used to run fine until about 4-5 months ago. This week I've been stuck at that issue. I cannot even build blank apps. Here are the steps I've made: 1) Create blank Unity project. 2) ...
0
votes
0answers
20 views

Detecting screen type that is rendering my Unity game

I'm working on a cross-platform Unity game for iOS, Android, standalone and consoles as well. Especially among standalone and console builds, it is clear that the game's colors are different (because ...
0
votes
0answers
29 views

Why the while loop is not pausing the coroutine?

I'm trying to find a way to pause the game the whole game. timeScale = 0f is not working on coroutines. I have this script that pause the game on escape key : ...
0
votes
0answers
9 views

Unity Game too dark on Samsung Galaxy Alpha (LWRP)

I just noticed that my game is way too dark on my old Samsung Galaxy Alpha. The game looks fine in the editor, PC version and on my Samsung Galaxy S7. I've been developing with Unity 2019.2.2f1 so ...
0
votes
0answers
8 views

Rotate to face the bottom of a unit towards a planet [duplicate]

I would like to have tanks that move around on a planet (a sphere). Depending on where the unit is, I would like it to always have the bottom of it facing the center of the planet. To do this I've ...
0
votes
0answers
19 views

How to execute something on a main thread in ECS?

I have a game in which I have 5000 spheres on the scene simultanously. I needed the spheres to check for collisions with player's mouse, so it looks like the player is removing the balls with his ...
0
votes
0answers
8 views

Share screenshot in Android chooser from Unity 2D

I am trying to share a screenshot of my game on social media. I want to use the in-built Android share options. This fantastic blog gives instructions on how to do this, however it does not work. ...
0
votes
2answers
28 views

How to change the intensity of a light

I just want to change the intensity of a light. The script is already in the light object, but I can't turn it up or down to save my life, and wherever I look, no one has the answer. ...
0
votes
1answer
31 views

In unity C#, why use the .SetBool(booleanname, boolean) command when you could just write 'booleanname = true'?

I noticed on a tutorial for unity someone used the code: private Animator animator; private bool isRunning = false; While further on, did: ...
0
votes
1answer
11 views

How to move/rotate different parts of an entity indepently from each other?

Background: I am playing around with a simple isomorphic 3D shooter where a player controls a character which can shoot other players. Here's an example scene where you can also see the hierarchy for ...
0
votes
0answers
17 views

Why has my object detached itself from the parent?

I made an two objects in blender, animated them, and saved them. Firstly, when I reloaded them, half of the animations I created had disappeared, which is annoying itself but the real annoyance is ...
0
votes
0answers
12 views

Elastic Collisions in Unity 2D

I am trying to create elastic collisions in 2d game in unity. I have a ball surrounded with a polygon collider and im calculating the reflected vector using the ball velocity and the normal at the ...
0
votes
0answers
9 views

Firebase Cloud Messaging in Unity android app

I'm trying to achieve the following behavior for push notifications using Firebase Cloud Messaging for Unity in an Android app. If app is in foreground, handle directly in app (access key-value ...
0
votes
1answer
44 views

3D A* Pathfinding Algorithm Help

I want to make a 2D turn-based-strategy board game, so I'll need to give my game some pathfinding logic so that units know how to move from place to place. However, I want my levels to have multiple ...
0
votes
1answer
22 views

Health bar without image collapsing to the centre in Unity 2D

I am trying to create a health bar that collapse symmetrically to the centre. The color palette of my game is minimal and the health bar is only one color that does not change with size. I am new to ...
0
votes
0answers
7 views

Root bone wasn't rotated, but after imported to Unity, animations were rotated and doesn't match loop

I made 9 animations in Blender and it passed humanoid type configuration(used rigify). All animations don't moving root bone at all(root bone position/rotation/scale is locked), however when I ...
0
votes
1answer
24 views

ToonRamp Shader + Normal Maps: How to keep strict lighting bands?

I'm trying to achieve a shading similar to the one on this image: Image 1: https://imgur.com/a/eTTvSCD To get something similar to this I wrote a toon ramp shader (similar to the one in the Standard ...
0
votes
0answers
15 views

Cannot seem to fix this error, MoveTo [closed]

I have been trying for quite some time to fix this error, but end up in a larger mess eventually. The error is: Assets\Scripts\PlayerControllerb.cs(94,24): error CS0103: The name 'MoveTo' does not ...
0
votes
0answers
17 views

Unity - Moving X amount of units to destination, RTS style movement

I have a reached a point now where I can select X amount of units, and move them to where I click. My problem is, they all try to get to the same point. I use Unity's own Navmesh + agent. I set ...
0
votes
0answers
37 views

How to access a game uploaded to the web? [closed]

I uploaded a game to the web, but forgot to build it to the computer. Now I cannot find it. Please help. EDIT: Problem Resolved. There were two things I was doing wrong. I built my project in the ...