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
89 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
191 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
189 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
143 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
293 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
110 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
378 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 ...
2
votes
1answer
96 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 * Mathf....
1
vote
1answer
539 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
127 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
24 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
299 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
193 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 x,...
-1
votes
2answers
60 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
71 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
61 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
122 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 Networking."...
1
vote
1answer
183 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
85 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
628 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
125 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 example(...
1
vote
0answers
252 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
447 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
423 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 command)(false,...
1
vote
1answer
298 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 (col.gameObject....
2
votes
0answers
62 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
312 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
178 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
91 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
158 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
205 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
248 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
206 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
226 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
146 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
45 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
534 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 ...
0
votes
1answer
70 views

How can I disable a RigidBody?

I have tried to set Rigibody enabled to false with this code but I get multiple errors. What is the correct version of this code? GetComponent<RigidBody>().Enabled = false;
1
vote
0answers
152 views

Unity nested network identity

I have a problem with nested GameObjects in Unity Networking (5.2); One of my GameObjects (lets call it mother) has a network transform component. Now the mother can have a variable number of childs ...
1
vote
0answers
86 views

Need to save UI.Image to png

I have ui.Image1 with Mask component and ui.Image2 that is placed inside ui.Image1, then I want to save the result to Texture2d to save the resulting image to png. Sprite sprite = sourceImage.sprite; ...
1
vote
0answers
20 views

Unity MecAnim Bones

Has anybody here used motion data to apply to mecanim and animate a Unity character with it? I have a motion capture device that streams in live motion data into Unity, through a plug-in. It's called ...
1
vote
0answers
86 views

Chartboost Adds are not showing up in android

I am testing chartboost example but no adds are being shown up. I have added app ID and signature. and Even test mode is enabled still its not showing up. I am using chartboost SDK Provided by ...
2
votes
1answer
130 views

Performance of instantiating many prefabs as children of one prefab in unity

Is there any performance difference between [instantiate multiple prefabs] and [put all prefabs under a single parent prefab and then instantiate that parent prefab] in scene. Hope you understand what ...
2
votes
1answer
107 views

How to create a trail like this in Unity?

I want to create a trail like this game... When the plane flies it creates this trail... It's possible because the game itself was made in Unity... But I can't find any options to do so... Any ...