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 (1)

2
votes
2answers
167 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
184 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
36 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
113 views

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

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
248 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
440 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
77 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
169 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
181 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 ...
3
votes
1answer
122 views

AddComponent with Network* at runtime?

I am trying to figure out how to dynamically add network components to game objects that are managed by the network. I started unity about a month ago, and I started writing all sorts of components ...
-5
votes
1answer
239 views

Make Camera follow object only on Y axis?

Can someone give me a script that makes the camera follow a specific gameObject only on Y axis without changing the camera's X axis position, in C#?
1
vote
1answer
94 views

Shader and Texture Scrolling depending on Direction

I am trying to scroll a texture using its uv in Unity but I don't get the result I need. The aim is to have two components, the speed and the direction. I would like to define the direction in ...
1
vote
1answer
320 views

Create sprites from 3D models at runtime in Unity

From my previous post where I search solutions to have animated characters in an isometric world (using 2D engine as base) arised this question. I'd like to create and instantiate 2D sprites from 3D ...
3
votes
2answers
169 views

Unity Inspector - Turn off script for a group?

I have a large group of objects in Unity that can be grouped and for one instance I want to turn off a script on each one, for over 100 this can be tedious, can this be done group wise within the ...
2
votes
1answer
94 views

How to orbit an object at certain speed in Unity?

I want to move an object around a circle. So I have this code below: static public int theta = 0; void Update(){ Vector3 position = this.transform.position; position.x = 0 + 50 * ...
1
vote
1answer
449 views

Unity Additive particle effect blends with background

I created a fire particle effect with the Particles/Additive (Soft) shader in Unity 5.2.2, and it looks fine against a dark background, like the editor background: However, when I move it in front ...
2
votes
0answers
107 views

Ways to get around the limiting default terrain shaders in Unity

I am trying to use the Toon Rim Light shader for Unity however there are a few problems when trying to use any custom shaders for a terrain in Unity. The most well known is of course, that all ...
1
vote
0answers
23 views

Unity - RageTools Performance

Has anyone used RageTools for Unity? What do you know about the performance? Is it more performant than using raster, for example with "puppet 2d" or the other way? I'm developing mobile games, so ...
1
vote
0answers
23 views

how to change default third player controls in unity, to work with touch?

I am developing a game for my project using Unity 3d and have currently used the third player controller available in standard asserts. I have to export it in android phone so need to modify the ...
1
vote
1answer
216 views

Unity apple/google ID access?

After extensive Googleing I have not come up with a way to access Apple ID's or Google ID's from unity running in respective devices. Either ID's or something else unique to the accounts logged in. I ...
2
votes
1answer
164 views

How to convert UV position to texture atlas pos and reapply to UV in Unity

I'm trying to apply a texture from an atlas to a mesh by reiterating through the UV array on that mesh, but I'm a bit lost on converting the coordinates. For example, if the texture required is at ...
-1
votes
2answers
59 views

FixedJoint error in Unity?

I get the following error every time I run the code: error CS0120: An object reference is required to access non-static member `UnityEngine.Joint.breakForce' Joint.breakForce = Mathf.Infinity; How ...
2
votes
1answer
107 views

In Unity, why does my IndexOutOfRange exception disappear when trying to debug it?

I don't get errors when playing from Unity "Game" tab. But when I build an executable (development or not) it stucks. I get "IndexOutOfRange" exception. Which also magically disappears (yes) when I ...
1
vote
1answer
65 views

Error calling another class? [closed]

I get the following error every time I run the code: error: error CS0119: Expression denotes a `type', where a `variable', `value' or `method group' was expected void OnCollisionEnter() { Stick (); ...
1
vote
0answers
28 views

Controlling gameObject with WiiRemote

I would like to get some information on how I can control my gameObject with a wiiRemote. Can't seem te find a decent guide on how to implement the WiiRemote into Unity. My game is just a simple ...
1
vote
0answers
68 views

How can I override a trigger scripts for different triggers in Unity?

I am trying to develope a story based game. And I developed my dialouge system (not an interactive system) with triggers. It is like this public class Trigger : MonoBehaviour { public ...
2
votes
0answers
60 views

Proper setup for Mecanim standing jump animation

I have a character standing jump animation with that the character at start prepares for the jump (flexing downwards) and then jumps up in the air and i'm wondering how to get it working properly with ...
1
vote
1answer
110 views

In Unity, How to format Old RPCs into new “PunRPCs”

In older unity versions you could simply used RPC. With newer verisons of Unity my code now doesn't work and it says that it needs to be transformed into "PunRPC" , Pun being "Photon Unity ...
1
vote
1answer
163 views

How can I ensure a Unity game continues to run in RAM, even if the disk it loaded from is removed?

I'd like to make a game with Unity, put the build with all the data on a USB key, plug it in another Windows computer, and run the game from the USB drive, then remove the USB drive, but keep the game ...
2
votes
1answer
83 views

In Unity, how can I register a custom file type that is always opened with my game?

I want my players to be able to create their own scenes as custom levels, save them as files (say custom1.gamelevel), and open them directly in my game program by double-clicking the level file, ...
5
votes
3answers
556 views

Is a custom coordinate system possible in Unity

Is it possible to create a custom coordinate system (i.e the one using double for coordinates or the one dividing the world into 'chunks' of safe size) not constrained by the floating point precision ...
0
votes
1answer
112 views

Choosing random array indexes in Unity C# [closed]

I want to change a string by randomly choosing an index in an array, using the random.range command in unity. Bare in mind that I'm using strings here, not floats or integers. Here is a code ...
1
vote
0answers
240 views

Implement Candy Crush like level graph

I want to implement road-map like level graph where in you can see what level are you and your friends are on. Just like we see in Candy Crush Saga.For people who have not seen Candy Crush Saga, ...
6
votes
3answers
387 views

Overcoming float limitations for planet-sized worlds in Unity

As far as I know, going further than 1M units from the world origin in Unity is hardly possible due to floating point precision issues. Making a world more than 1M units in radius would require ...
1
vote
2answers
358 views

Is there a random command for Boolean variables in Unity C# [closed]

Can you randomly choose a Boolean's value in Unity C#. I tried random.range, but it only works with floats. Here is an example of what I'm trying to do: Boolean = (random boolean value ...
1
vote
1answer
283 views

Make gameObject “stick” to another gameObject after it has collided with it? [duplicate]

Currently, I am using the following code to make objects stick to other gameObjects. rb = GetComponent<Rigidbody>(); rb.isKinematic = true; gameObject.transform.SetParent ...
2
votes
0answers
55 views

Restore IAP in Android using Prime 31

can someone please guide me how to restore purchases in android using prime 31. What my basic understating is to get the list skus which player has purchased after he logs in with his account and ...
2
votes
1answer
308 views

“Squeezing” a game object based on distance to another game object [duplicate]

I am trying to "squeeze" a gameObject. When distance starts to be 6.98, execute this code: "The smaller the distance between gameObject1 and gameObject2, the thinner and longer this gameObject is". ...
4
votes
1answer
151 views

How can i convert non-canvas mesh collider object as canvas mesh collider object

I am new to unity i created a character object in Maya and stored it as char.obj, then i import the object in unity. the char1 object is not colliding with any other unity objects like cube, plane, ...
3
votes
1answer
70 views

Matching collider to character mesh size in different postures

What's the optimal method in Unity to match the size of a Capsule Collider to the actual size of the game object it is part of? To understand what I'm trying to do let me give an example: I have a ...
2
votes
1answer
74 views

How to properly use prefabs with 2D game?

I have a concern about prefab's purpose. When I create a npc like a monster with all it's animations, script etc, I then create a prefab to instantiate it. When I want to insert different monster ...
2
votes
1answer
153 views

Detect walking on floor - works partially

I have a set of Gameobject blocks that form a floor with Box Collider and a GameObject with a Box Collider in it. My first hunch detecting hitting the floor was: void OnCollisionEnter2D(Collision2D ...
2
votes
0answers
172 views

In Unity, how do I make a 3D flight arc preview?

I'm stuck on how to make a preview trajectory for a projectile appear when holding a button. The trajectory should start at a certain position on the scene and end wherever the player points their ...
1
vote
2answers
201 views

Mixamo Models not Importing Correctly in Unity

Mixamo (now Adobe Mixamo) allows us to choose character and then animations from its website from free samples. I have done one simple animation and added the model to Unity. The animation works fine ...
2
votes
1answer
204 views

Should I make game engines to be a good “game programmer”, or is it more important to build games with Unity/Unreal? [closed]

Do I need to make game engines to be a good "game programmer" in general, or is it more important to build games with Unity/Unreal and learn coding along the way or both? I am going into a Computer ...
6
votes
1answer
198 views

How i can make hole in objects in unity

I need to have a hole in my objects and I don't want to use terrain. I'd like to use an object and cut them out of another object, so that there is a hole in which the player could fall into; a 'game ...
1
vote
1answer
134 views

Making isKinematic false when OnCollisionEnter()?

I have an issue with my script, I want to make rb.isKinematic go from true to false when collision is detected. With this script, nothing happens when a supposed collision is happening which means ...
2
votes
0answers
43 views

How would I add a sound variable to my code?

I am writing some code in JavaScript for a ray cast shooting program. I have all the variables I need except for sound, and I'm not too sure on how to add that variable into my code. I would really ...
3
votes
1answer
373 views

How to get direction and velocity of movement of an object dragged with the mouse in Unty (C#)

I have an object that is dragged by the mouse (X and Z positions) over a table, with the following simple code: Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); if(Physics.Raycast(ray, ...
2
votes
0answers
34 views

5 Examples of game Development technology helping/using movie animation technology and vice versa [closed]

I wish to have information on the technology of game development say Unreal being used in the movie industry. I also wish to have information on the technology of movie industry being used in the game ...