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)

2
votes
1answer
955 views

best way to destroy an gameobject in unity

MissingReferenceException: The object of type 'GameObject' has been destroyed but you are still trying to access it. Your script should either check if it is null or you should not destroy the ...
4
votes
1answer
124 views

Unity 5 - custom lighting model

I have tried to use my own lighting model in surface shader in Unity. But there is a problem. If I init my own lighting via #pragma surface surf _SimpleSpecular Lighting_SimpleSpecular method is ...
1
vote
0answers
63 views

Unity Animator/Collider Default Property Issues

How do you use Unity's Animator when dealing with animation curve values that have a default value and the default value causes jumps in animation transitions? I have a bit of a complex problem with ...
3
votes
2answers
879 views

Unity 5 - What is the proper way to handle data between scenes?

I am developing my first 2D game in Unity and I have come across what seems an important question. How do I handle data between scenes? There seems to be different answers to this: Someone mention ...
3
votes
1answer
125 views

create a seamless room

I'm trying to create the effect of the second picture below where there is no seam between the floor or wall. An effect that is typically used in studios by having a curved wall. This way it looks ...
0
votes
1answer
120 views

Stop detecting Input in Unity?

How can I stop detecting input from the user in Unity? I want to achieve the following: "do not detect Input.GetMouseButtonDown" In C#?
3
votes
1answer
144 views

Can I integrate Unity 5 with the 0.6.0 runtime for Oculus DK2?

I am a new user and I am trying to get the Oculus running on an old PC. I had a few issues with the latest SDK so I am currently using the 0.6.0.1-beta version. I would like to integrate Oculus with ...
2
votes
2answers
76 views

How do I make my character change his ability's when his sprite changes

I am making a platformer and am currently trying to have it so that my character will have different powers based on his emotions, and his sprite will change to match those emotions. I have got it ...
4
votes
1answer
251 views

Unity3D multi-threaded data importer?

Goal I would like to be able to separate all my data file readers from the main thread and balance the load over multiple frames. The idea being that while the data is being read/parsed/filtered I ...
-5
votes
1answer
302 views

Check elapsed time in Unity?

How can I check the elapsed between two intervals? I want to do the following: "start time counter when Input.GetButtonDown("Fire1") , stop counter when collision is detected` And then Debug.Log the ...
1
vote
0answers
129 views

Character Movement and Collision with Ragdoll Rigidbodies/Colliders?

I have a player character that I'm moving with a character controller script and it is moved by applying velocity to a Ridigbody. This works when I have a rigidbody component on the player but my ...
1
vote
2answers
64 views

Wall checking not working correctly

Basically I am working on side scrolling 2d game. For that I want to check whether player is collided with wall. I have written some code for it but can't able to decide where I have done stupid ...
2
votes
0answers
127 views

Changing AnimationOverrideController “sometimes” fails - Unity 5.2.1

I have the following code, in a menu where you can chose the armor and weapon of a character: private List<string> armors = new List<string> { "armor1", "armor2", "armor2" }; private List&...
1
vote
0answers
178 views

Streaming 3d model --> unity android

I want to include a feature in my game that allows me to host raw 3d models (.fbx/ .obj/ etc., not AssetBundles) on a server. The game should download these files, save them to the device and load ...
1
vote
1answer
32 views

Trying to make a respawn trigger, but any rigid body (or collider probably) keeps triggering it. Any ideas?

I'm trying to make it so that if any object passes through with the matching tag it will reload the level. However, any rigid body (or collider) is setting it off which is not the desired behavior. ...
1
vote
0answers
187 views

How can I shoot an arrow if I know the shot power and target?

I am trying to shoot an arrow at a target with a 100% success rate. Given the initial force applied to the arrow, the gravity, the location of the archer, and the location of the target, how can I do ...
1
vote
2answers
119 views

Limit buttontext to one line in Unity?

I have many buttons in my game. There are different texts on them every time. But some texts are too long and get split up into two different lines. Is there any way I can fix this without resizing ...
4
votes
2answers
212 views

Unity Ragdoll Colliders don't collide

I have a humanoid character with Ragdoll setup in Unity. However the box/capsule colliders on the various parts of the body don't collide with other static geometry. They do collide with the ground ...
3
votes
1answer
601 views

Unity XCode build linker error

We are trying to build a Unity game in Xcode but keep getting this error: ld: '/Users/Pero/Documents/GitHub/MyGame/XCodeProject/Pods/GooglePlayGames/gpg-cpp-sdk/ios/gpg.framework/gpg(libgpg.a-...
2
votes
1answer
148 views

How do I set the Jump distance and height of my sprite in C#

I have been able to make my sprite jump for a platformer I am making in unity. I can't seem to be able to make him jump a certain height or distance though, every time he jumps it's like he's jumping ...
2
votes
2answers
173 views

Unity trigger timer

So essentially I'm attempting to implement a "security" system by using an object with no mesh collider to act as an invisible trigger (stretched across a doorway or something) which sets off an ...
1
vote
0answers
443 views

Unity 5 light reflection on the water surface

How to adjust reflection in Unity 5 to show up it on the water surface. So I have few light elements in the scene. So I want my water pro to reflect this lights. As example you can see red and yellow ...
1
vote
0answers
59 views

Collision issue [closed]

I have a player who i control with tilting. Also i have some game objects (something like ground or areas where player can not move). The problem is that if these objects are too small the player can ...
2
votes
1answer
178 views

Unity3D Joystick Buttons Xbox360 & PS3 have Inconsistent Button Inputs?

I've been browsing through Google and researching button inputs in Unity, and I came across this page. When looking at it I noticed that the B button on the Xbox360 controller is set to Button 1, but ...
1
vote
1answer
54 views

Why the skyline continues to stay on the same place and how to change this?

I started my first Unity3D project and in this game main hero should be able to fly up passing clouds and then reaching open space but i faced with the problem. No matter how long and fast i am flying ...
3
votes
1answer
122 views

How to write a custom shader in Unity 3D that lights up a specific pixel or group of pixel?

I'm making a FPS game in Unity, and I want the environment to light up as the player is shooting on his environment. The map would be entirely put in darkness at the beginning, but as the player ...
2
votes
1answer
216 views

Texture tearing with UV texture atlas mapping

The following code maps the texture from a texture atlas to a UV. The problem is I'm having texture tearing issues. Does anyone know how to overcome this problem and have any suggestions? Here is the ...
3
votes
1answer
75 views

Play Audio After Countdown In JavaScript

Is there a way I can have an audio sample play after a certain amount of time, like 3 seconds in JavaScript? I've looked everywhere and can't seem to find what I'm looking for! I'm very new to this ...
1
vote
0answers
170 views

UE4 or Unity or Libgdx for VR project using Oculus rift and Novint falcon

I've to make a multiplayer game Air Hcokey using 2 Oculus rift and 2 novint falcon controllers , I know that these 3 engines support the Oculus Rift but have no Idea if they do support the Novint ...
3
votes
1answer
448 views

Animation conversion failed: transform for bone not found?

I'm trying to animate my first humanoid, and the animations in the Standard Assets pack (HumanoidIdle etc) work really well right out of the box. However, when I try to use other fbx files, like those ...
2
votes
2answers
71 views

Creating a delay by using Invoke

Is it possible to delay the effects of a script that is attached to a game object? I have 2 characters in a scene, both receiving live motion capture data, so they are both animated identically. I ...
2
votes
5answers
773 views

Jump a gameobject when a key is pressed

I am working on a platform game,When I press the space bar the object should jump and when I release the space bar it should come down. The code I have used for jump is void Update () { ...
2
votes
0answers
53 views

Improving Position Sync Bandwidth Usage in a Multiplayer Game

This is the class i use to sync position between clients in a multiplayer top-down 2D shooter game: [System.Serializable] public class MovementUpdateClass { public int MessageTime ...
1
vote
0answers
218 views

Smooth+Flat shaded meshes cause shadow artifacts (understanding the source of the problem)

I'm using blender to create assets to use in Unity3D, and I'm having some trouble understanding how the smooth/flat shading interacts with shadows, I'm sorry if it has been asked before, but all the "...
1
vote
2answers
139 views

Error with Quaternion.FromToRotation in Unity?

I get multiple errors whenever I run this code: transform.rotation = Quaternion.FromToRotation (Vector3(0, 0, 0), Vector3(0, 0, 270)); Can you suggest a fix for this code? Errors: Expression ...
2
votes
1answer
188 views

Use Accelerometer for Roll-a-ball Movement

I'm working on maze game for Android in Unity 5.1.1f1 and I have troubles with controlling my ball with accelerometer. At start I tried: public class PlayerController : MonoBehaviour { public ...
-1
votes
1answer
106 views

gameObject rotation in Unity issue? [closed]

Can someone provide me with a script that makes a gamebject calculate its rotation speed based on the next collision, in a way that when it collides, it collides with its original rotation. I do not ...
5
votes
2answers
2k views

My game crashed… Access Violation (0xc0000005)

I guess this is the first official crash I've had in Unity (that is not just an infinite loop.) The game works just fine in the editor but when build and run it, the game won't even start. I just ...
4
votes
4answers
177 views

Better way of handling the relation between Bullet and Enemy

I was wondering how should I design this relation in terms of "better OOP"? Should I have a Singleton EnemyManager which contains a list of enemies (EnemyList); then Bullets can access the EnemyList ...
2
votes
1answer
347 views

My player sprite get stuck to walls while moving along

Hello, My player sprite is moving along the wall (not even diagonal, just straight down) and get randomly blocked in the corner of some walls. By blocked, I mean that the Y movement is stopped. If I ...
2
votes
1answer
74 views

Is It Possible To Reset UI To Initial State At Runtime Without Any Direct Assignments?

Is it possible to reset UI to it's initial state (the state when game started) without directly reseting elements one by one? Thanks in advance. Edit: I'm asking for runtime. (ResetToPrefabState ...
2
votes
2answers
204 views

How I can count how many time gameOver scene is loaded?

I'm building a game using unity 3d and I want to add an interstitial ads to it, but I want it to appear after the player lost every 3 times. So when the player loses for the first time the ads will ...
3
votes
2answers
257 views

How to animate a character with props in Blender and then have these props modifiable in Unity3D?

I have created a fully rigged and fully animated humanoid model in Blender with rigging based on Unity's Mecanim standards for humanoid models. Now, I want to create custom animation for it in ...
1
vote
1answer
37 views

Unity object stuck where it shouldn't

Here's the thing. I am making a 3D top-down game about cars on the road. Right now I have different-colored cuboids representing cars. They are position-locked in Y and rotation-locked on all three ...
1
vote
1answer
132 views

The type or namespace name `OpenCVForUnity' could not be found [closed]

I am working on face traching in unity3D I have downloaded and imported the sample project on "FaceTracker Sample using OpenCV for Unity". But when I tried to runned the project,its showing me the ...
2
votes
0answers
314 views

How To Create A Dynamic 2D Rope In Unity?

I'm trying to create a 2D rope in Unity that is fixed at one end and other is moving up and down to pick up objects just like a crane. I've tried adding a cube and making more instances of it, ...
1
vote
1answer
538 views

Failed to load QCARWrapper.dll

I am using unity 5.1.0f(64 bit) and Vuforia SDK Version: vuforia-unity-5-0-5 The web cam is operating normally in windows but in unity in Play Mode not. I am getting an error message "failed to ...
2
votes
1answer
91 views

Game over when both players die

I watched the Unity Space Shooter video tutorials and then I have added a second player. I can not seem to get the 'Game Over' when they both die. It will happen when one player dies but not both. ...
1
vote
1answer
219 views

Unity/vuforia imagetarget - object not showing properly

I learn it from vuforia tutorial on youtube. I add a white cube(or sphere) as the child of image target. When the camera catches the image target, the screen turns to be totally white. It seems that ...
4
votes
2answers
194 views

Does Google Play allow an account to log in to the same game on 2 devices?

I'm developing an online Android game with Unity. I want all Google Play accounts to have only one session logged in at a time. Do I need to write my own code to disconnect an existing session on ...