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.

learn more… | top users | synonyms (2)

1
vote
0answers
32 views

Export UnityProject inside Android Studio's existing project

I am new to the Unity3D, but I have made a small Unity project with a humanoid gameobject. I can move this humanoid with the demo data but I want to move it with the quaternion data which I am already ...
1
vote
1answer
42 views

Best approach for destructible car in Unity

I'm developing a simple racing car game. I'm wondering what is the best approach to manage visually car destruction. For instance: i think one option (expensive) is to build car 3d model with '...
5
votes
2answers
63 views

Force Reload VS soution Explorer when adding new c# Script via Unity3d?

When I create C# script (Create -> C# Script) via Unity3d or delete it from Unity3d - Visual Studio shows me the warning window. it's annoying. Is there any way to force "ReloadAll" in ...
0
votes
0answers
34 views

Leaderboard setup for Android

I am totally new for this setup. I am trying to implement google Leaderboard. I followed the step by step process showed in "This Link". i opened windows -> Google play games -> setup -> Android setup....
1
vote
0answers
14 views

How can I change existing hierarchy in Unity regarding animations?

I made a bunch of animations in Unity. Now I need to adjust the hierarchy. For example: My animator used to change things in this tree, where the head, legs, and arms were animated: Player -->...
1
vote
4answers
90 views

How can I determine which Trigger is hit?

I have a GameObject. It has 3 BoxCollider2Ds: Body Collider - Not a trigger - Determines if body is hit Weapon Collider - Trigger - Determines if weapon is hit Vision Collider - Trigger - Determines ...
2
votes
2answers
68 views

object smooth orbital limit around another object depending on mouse drag

I am working in Unity. I have special objects that can each be dragged freely around in 2d. The objects cannot get too close to other objects (minimal Vector3.distance allowed is 1.5f). I also have ...
1
vote
1answer
22 views

Unity WheelCollider motorTorque acceleration with ps4 triggers

I'm fairly new to Unity and i'm struggling to find some answers. Every car script and wheelCollider tutorial I can find is based in the horizontal and vertical axis and that works great. But I'd like ...
1
vote
1answer
22 views

Anyway to change the property of a existing animation to another type?

The title pretty much says it all. Take this rather simple animation I would like to reuse this same animation in a UI element but for that I have to animate the Image component and not the sprite. ...
1
vote
1answer
27 views

Modify texture of sepcific area of Terrain in unity

I am developing a farming simulator 3D game in unity. I have a crop field on terrain which is actually a texture paint in square to show a crop area, and i have to perform sowing (prepare field for ...
3
votes
2answers
96 views
+100

Gfx.WaitForPresent performance issue

I am making a 2D mobile game and it runs really well (60 fps) on my phone. However, in some cases the performance goes down drastically to the point where it runs at 20 fps or even less. It happens at ...
3
votes
1answer
27 views

Unity and Thread for Reading UDP

I have a GameObject that reads sensor data coming in over UDP (formatted as JSON). What I am observing in that my handshake (dataReady) is getting cleared by the Update() cylcle fast enough, and I am ...
1
vote
1answer
41 views

Unity using Animation and Ragdoll

The question is simple, but I can't resolve it for a couple of days. I have an enemy model with ragdoll attached and also a couple of animations(e.g. idle, walk, run). It seems that ragdoll work only ...
1
vote
0answers
52 views

Unity game randomly closes when phone is streaming the screen?

My Unity android game (frequently) randomly closes on some phones when it's streaming with the YouTube Gaming App for example. I have Unity version 5.3.5f1. I have to say that this phenomenon did not ...
1
vote
3answers
77 views

Is it bad practice to store inventory and scores in PlayerPrefs?

I'm building a mobile game for a client in Unity. To save time, we started with a template game from the Asset Store that had some of the features that the client wants. The game includes a ...
-5
votes
2answers
72 views

How can I test which of two gameobjects is closest to a third gameobject?

It would be nice if it was as simple as: public void Closest() { if (A.distance > B.distance) {} } But any sort of workaround would be acceptable.
3
votes
3answers
134 views

Creating laser redirection (eg. Portal 2 Cubes)?

Okay, so I asked this question about 2 years ago, and revisiting my project, I'm amazed I still can't think of a solution. I seemingly can write basic adventure game engines from scratch, but Unity's ...
1
vote
1answer
41 views

is it possible to use Ui button to work continous on unity

i want to use Ui buttons as joyStick arrows to move character. but as i know buttons just work once. not continous. so is it possible to make button work continous?
1
vote
3answers
80 views

How to Display hints to user when he is inactive for more than 5 sec in unity?

I have made a 2D Game using unity in which user has to select objects of similar color and now i want to display hint when user is unable to select the color for more than four seconds. I want ...
1
vote
1answer
60 views

What's wrong with my animation trigger script?

So I am making an RPG and I am setting up the player. I am trying to trigger an attack animation by pressing a button. I wrote this down and I get an error that says "Expressions in statements must ...
1
vote
2answers
57 views

how to work more efficient with UI elements

im working on a mobile android game that has many levels and same UI. for every level i have to assign the object and function of every button in every scene level. is there more effiecient way that ...
1
vote
0answers
23 views

Models keep turning white - Unity 5.3.5p1

I'm using Unit 5.3.5p1 but for some reason my models randomly turn white after I build an exe to run outside the editor. The textures work perfectly fine within the editor, but as soon as I build and ...
1
vote
0answers
19 views

Stencil inside Stencil? (Multiple masks on same object)

So please take a look at what I want to achieve The Red and Blue part is the object I want to mask. The thing is that it will be masked by the green area, and only after that it will be masked by ...
1
vote
0answers
23 views

Stencil IncrSat and DecrSat explanation

Can someone please explain me what is the purpose of IncrSat and DecrSat? Currently I know that they increment/decrement the current value in the buffer and they make sure the value is between 0 and ...
0
votes
1answer
29 views

how to use unity3d webgl content in a asp.net mvc view?

I asked this question in stackoverflow but no answers so I think it would fit here better. I have a unity webgl project and an asp.net mvc project. I need to show the webgl content in a view. The ...
1
vote
1answer
47 views

How to switch between sprites in Unity

So I made an empty game object in inspector, called it "squareTest", and I clicked and dragged 3 sprites in. One is the square being black, one is the square being red, and one is the square being ...
0
votes
0answers
19 views

Zoom in and change scenes in unity [duplicate]

I'm trying to zoom in as my game is like a map and I have to click on a certain country to zoom in and change the scene to this country. So I want to zoom the camera slowly and then change the scene ...
0
votes
0answers
28 views

How to make the player glide after a jump in Unity?

I need a script that can make my player do an horizontal movement when he is in air (jumping) Take my older script! using UnityEngine; using System.Collections; public class Player : MonoBehaviour {...
1
vote
0answers
26 views

Unity - SerializedObject.ApplyModifiedProperties() using relavant property setting method

The problem I have is this. I have an editor script, at the end of OnInspectorGUI() I want to apply all the changes with the serialized object. The simplest way to show my problem is thus: [...
4
votes
2answers
101 views

Object outlining

I have an object whose boundaries can be define using a convex collider. I have an AI which needs to outline that structure to patrol it. The object is dynamic and composed of pieces like LEGO, each ...
0
votes
1answer
56 views

Zoom in and switch scenes in unity

I'm trying to zoom in as my game is like a map and I have to click on a certain country to zoom in and change the scene to this country. So I want to zoom the camera slowly and then change the scene ...
1
vote
1answer
25 views

How to distinguish between full/partially intersecting Collider2D?

I'm using Unity 5 to make 2D game. I have a screen (gray), arena (green) and player-controlled object (yellow) that can be moved across the screen with mouse before placement: There is no ...
0
votes
3answers
68 views

How do I make my Unity application quit programmatically?

I made a script and I want to make my game quit, but this does not work. How should I go to make the app quit? using UnityEngine; using System.Collections; using UnityEngine.SceneManagement; public ...
0
votes
1answer
47 views

my android game works very well on unity editor but not on device [closed]

Im working on a android unity project. My game works very well on the editor but, when i build it and run it on blue stacks emulator, it starts working corruptly. Bullets shoot twice in a time. When ...
1
vote
1answer
45 views

How to use NoSQL REST API of Gamesparks in my Unity project? [closed]

Gamesparks has a documentation of the API but I am not sure how to send https requests to use that API.
-2
votes
4answers
98 views

How can I exclude a range of values when generating random numbers?

If you are using Random.range to generate values, is there any way to exclude some values within the range (for example: pick a number between 1 and 20, but not 6 through 8)?
1
vote
2answers
23 views

Modify the Y position of a GameObject on startup

I'm trying to modify the Y position of a GameObject on startup with the script below: int y; void Awake() { y = Random.Range (140, 155); Vector3 temp1 = transform.position; ...
1
vote
0answers
37 views

How to manage collision of two player ?

I'm developing a multi-player car game. Suppose that car A hit car B: both A and B have Rigidbody and collision functions attached. Because car A hit car B i want to take actions only to car A (add ...
0
votes
1answer
13 views

Playing an animation all the way through with one quick keypress with Mechanim Unity

I have an if statement inside of the Update function that is only called if three other conditions are met. The problem is that right now the function sets a boolean to true which causes the animation ...
1
vote
1answer
44 views

Unity rope/cable physics / anchor points

I'm creating a cable in Unity, which should behave realistically. I found 2 different ways to approach the problem. First was to simply rigg a subdivided cylinder in Blender, Cinema4D or whatever ...
1
vote
1answer
50 views

In Unity, Change which mouse button is used to scroll in ScrollRect

I've created a new ScrollView in Unity. How do I change which mouse button is used to scroll in ScrollRect (through script or in the editor). By default it's the left mouse button. I'd like to be ...
1
vote
3answers
96 views

Unity AddForce causing twitch

Since this wasn't clear enough, I've removed even more code. It kind of defeats the purpose I was aiming for, but I guess getting any answer relevant to the problem is better than none. What I want: ...
1
vote
1answer
40 views

How to stack sprites?

I am currently working on a 2D game in Unity, I am using Animation Controllers / Animators for the different slots of armor on the character. The scripts set the Animation to the player object and ...
1
vote
3answers
437 views

UNITY : I want to make my UI text fade in after 5 seconds

I know this question has been asked and asked but none of the topics i visited gave me an answer. I'm making a game programmed in c# where you control a boat and i want my UI to appear smoothly by ...
13
votes
1answer
178 views

how to automate the game testing?

I am new into this field of testing. I just developed a basic game using unity engine but i want to test it. I have checked with selenium but i don't know how to get the value that is being returned ...
1
vote
1answer
51 views

unity 5.x performance

after I downloaded unity 5, it became very consuming, my pc becomes hotter and makes a lot of noise. also building, compiling, baking of game takes a lot of time, I am making multiplayer game and need ...
0
votes
2answers
47 views

snap an object to another object?

so I have some walls which are cubes stretched along a direction.and I have some windows and doors that are suppose to snap to a wall and don't let go until the desired location is out of the snapping ...
0
votes
1answer
22 views

Handling movement on sloped surfaces - clamping character to sloped surface

I've noticed that a lot of people seem to have this issue but I've yet to find an actual working solution - when a rigidbody-based character controller (I'm not using Unity's character controller) ...
0
votes
1answer
28 views

Unity 2d square position not lining up with its size

I want to have one square that rests at the Unity 2d coordinates (5,5). Using transform.localScale I make the square be 3 units by 3 units large. So I thought that if I made another square that is the ...
0
votes
1answer
68 views

Detect collision with static collider only

Is this possible to detect collision with static colliders only I check it is not working. I dont want to use rigidbody or character controller with my box collider.