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)

0
votes
1answer
34 views

Unity: Object is underneath another object but shouldn't be

I have a simple collision detection program. The red object is controlled by the user and the yellow object is always moving up and down: However, when the objects are supposed to collide, the red ...
0
votes
1answer
34 views

Stop Unity UI Buttons from being clicked when a Facebook Window is overlayed

Having an odd issue. When I play with the Facebook SDK for Unity, and the Windows popup like the login window or the Friend Selector window, if I use the mouse to click in the window I end up clicking ...
1
vote
0answers
33 views

Make FPS Controller in Unity suitable for Touch? [closed]

I have a standard fps controller in my app that is controlled by default via mouse. What is the best way to make it touch friendly? Is there something that needs to me modified in the FPSController ...
0
votes
1answer
42 views

Raycasting on Z in 2D

I'm making an isometric game in Unity. So far I have managed to render a diamond shaped board, with tiles that are aligned on the x and y axis (and the camera looks down the Z axis). I am spawning ...
0
votes
0answers
25 views

How to import character from Mixamo with animations

I am in desperate need of a way to import a free character from maximo with the walking and idle animation. I have been trying for 2 days in a row now trying to get this to work but I just cannot do ...
1
vote
3answers
112 views

Unity rigidbody2d.velocity jumping causes weird bouncing

Im working on a game 2d game that has some platforming. I followed this video as guidance and produced the following code: public class PlayerControler : MonoBehaviour public float ...
0
votes
1answer
75 views

Where to store service urls for a Unity3D game

I have URL information for services (dozens of them) that I want to store in a Unity3D web player project. What is a good practice for storing it. (please don't say hard coding them) I've recently ...
0
votes
0answers
29 views

How to import animations from one model to others

I have two models (one animation in each) which I got for free from Mixamo. I imported them in Unity and they look like this: http://imgur.com/atjQbkI Justin@Idle and Justin@Walking. As can be seen ...
1
vote
0answers
77 views

How can I more efficiently paint grass onto a large terrain object in Unity?

I'm trying to paint a grass onto a large terrain and I want it to cover the entire terrain. Since the brush size can't go past 100 it would seem that I'm stuck painting the entire thing with a small ...
0
votes
1answer
63 views

Idle+Walk animation problem and double-button input axes

I have 2 problems with unity3d. First, I created an animator and attached it to player. In animator I put 2 condition, Speed and Running (first is float, second is boolean). Default Animation is ...
1
vote
1answer
51 views

Referencing in unity

Background: We have two people in the team, one of which is a UI designer and the other is the Unity3d developer. The designer makes the 3d models in Maya and sends them to developer so that he can ...
0
votes
0answers
28 views

Unity 4.6 Controls (Buttons, Triggers, Text) get Distorted once an Add or something above them is shown

I am using Unity 4.6 UI and facebook SDK for unity and creating a custom invite dialog. The problem I am facing is that the custom listview that I have created get a bit distorted once a panel like ...
0
votes
0answers
59 views

Converting from global coordinates to position in an array

I'm working on a minecraft style voxel game in Unity, and I keep having problems trying to work out how to convert from the global coords to the position in the 3d array used to store blocks. I'm not ...
0
votes
2answers
116 views

How to set player rotation to direction the player is moving?

I'm having an issue with my click to move mechanic. I want the player to move to a specific position in the game when the mouse is clicked (and it does just that) but the issue I'm having is that the ...
0
votes
1answer
56 views

Animated Energy/Combo Bar (Unity 4.6) [duplicate]

How could I achieve the animated Combo bar effect used in Ski Safari / Ski Safari: Adventure time? Preferably with Unity 4.6 UI. General explanations also welcome! Links to videos showing the wanted ...
-1
votes
3answers
148 views

Aspiring game dev - Is HTML5 worth it? [closed]

I'm a college student who is fairly familiar with JS & PHP and have made a couple web apps for my previous job. I'm looking into working with Unity for my future game projects, but there is a bit ...
1
vote
1answer
51 views

Torch fire always up regardless of handle direction

I have a prefab from some asset pulled into our project. It is a simple torch.. handle and a particle system for the fire. Works perfect if mounted on a wall and torch angle adjusted no problem. ...
0
votes
1answer
35 views

Handling image size based on different ios device versions (Unity2D)

This game is built using Unity 4, C#, and the 2D toolkit. In the unity game scene settings, it is set to (ios 5 tall) and I matched the Menu background dimensions with the dimensions of an ios 5 tall ...
1
vote
0answers
45 views

Having unity game saved to SD card can't run on certain devices but after it's moved to phone memory it works.. why?

A game I made ends up not being able to run (it shows the loading screen but after that it gets stuck), happens on nexus 5, sony experia z3 and I found this happening because the game was downloaded ...
2
votes
1answer
75 views

Unity's StartCoroutine funtionality inside a .NET Library and outside a MonoBehaviour

This code is used in a MonoBehaviour script in my current code: // a simple WWW post WWW www = new WWW(this.Url, bytes); StartCoroutine(WaitForRequest(www)); } // simple handler for the ...
0
votes
0answers
31 views

Unity: Combine two UVs by alpha

I'm currently creating a voxel game like Minecraft. To display the damage of blocks, I want to combine the alpha channel of one part of my texture map with the actual texture (like Minecraft does), ...
0
votes
1answer
21 views

accessing GUIText and recieveing NullReferenceException Error

I Have this line of code public class HSLerp3 : MonoBehaviour { private GUIText textFade; private float startAlpha = 0f; private float damping = 0.5f; // Use this for initialization ...
0
votes
1answer
45 views

Creating a single GUI Text with Fade-In [closed]

I have this line of code void Update () { float alVal = 0.0f; float damping = 1f; alVal += damping * Time.time; GameObject text2 = new GameObject(); text2.AddComponent ...
1
vote
1answer
63 views

Getting any type in Unity Inspector

I am developing a SaveManager system for my games. Basicly what it should do is; 1) Gets the "ANY" user created Serializable class by Drag&Drop to inspector. (save data). 2) Writes that class to ...
0
votes
1answer
74 views

Problems with Raycasting Requirements

Im working on a script which kinda works like an Enemy AI. Its kinda like a detection system with requirements that are required to be met. This is a recent question i asked using my code Raycast ...
1
vote
1answer
40 views

Changing Light Intensity value

I have this code for creating a light: GameObject lightGameObject = new GameObject ("Light1"); lightGameObject.AddComponent (typeof(Light)); ...
0
votes
1answer
41 views

Cannot store value in transform.position.y

Well I have this line of code Vector3 pos = cell.CellPosition; float light1Height = 10f; pos.y = light1Height; lightGameObject.transform.position.y = ...
5
votes
2answers
340 views

Advanced Cellular Automata to generate caves

I am trying to make caves in Unity. To do this, I am trying to use cellular automata. I found the following(Rouge Basin Cellular Automata for Caves) that resembles what I am trying to accomplish. But ...
0
votes
1answer
56 views

Can't play animation from script in unity

I'm making a 2D sidescrolling game in Unity, and when the player shoots an obstacle, I want the obstacle animation to play and then destroy itself. I got it to destroy itself, but the animation won't ...
1
vote
1answer
52 views

Anchoring HingeJoint2D to clicked upon spot

I'm creating a 2D game where the user can click and drag objects around. This is done by connecting a 'Hand' object to the object the user is current clicking on with a HingeJoint2D. Right now it ...
0
votes
1answer
60 views

Raycast Flashing problem

Can anyone tell me what is wrong with me code ? If you can see, whenever the player is in range of the raycast. The enemy turns red. But for some reason. Even when the player has meet the requirement ...
0
votes
1answer
45 views

Unity 2D collision detector not working

I'm making a 2D sidescrolling game in Unity where the player shoots at obstacles while running. But nothing I try seems to get the collision detection to work. This is the obstacle script: void ...
0
votes
1answer
33 views

How do I make this block go back to the left with another click?

This is the script I've written so far which makes the block move from the left of the screen to the right on a mouse click. What I want to achieve is for the block to move back to the left when I ...
2
votes
1answer
143 views

Unity access Label in GUI?

There is a quick and dirty appreoch to creating text boxes: void OnGUI(){ GUILayout.Label("Text 1"); } It works well. But, since the Label method returns void, how do I access this later on? ...
0
votes
2answers
56 views

how can I put an array of objects into a script?

I want to create an animation from an object sequence. I already achieved exactly what I needed with the "MeshAnimaton script" from bummzack: using UnityEngine; using System.Collections; /** * ...
0
votes
1answer
57 views

Unity GUIText not visible and not WYSIWYG

I have placed a Guitext in my hierarchy: At first it was visible, now I can't see it when I run the game. When it was visible: When modifying the position on scene, the GUIText appears on one ...
0
votes
1answer
35 views

Changing one prefab changes all other instances of that prefab too

I have made two prefabs of my enemies for my 2D game: normal and damaged. The I put several of these prefabs on scene. When enemies health <=0 I need to destroy its GameObject and then instantiate ...
0
votes
1answer
88 views

Smoother object movement in Unity?

I'm using this code in my script to move a gameobject: void Update () { // Move the object forward along its z axis 1 unit/second. transform.position = new Vector2(transform.position.x , ...
0
votes
1answer
42 views

Access other scripts variables and classes of different directory [closed]

Im trying to learn how to access another scripts variable and classes of different direction, in Unity3D. But for some reason it keeps giving me the error. NullReferenceException: Object reference ...
0
votes
1answer
33 views

Unity - Sprite with collider2d hits a rigidbody - Searching for a way to make the rigidbody not to react

When a sprite with a box collider 2d hits the game object (rigid body), the collision detection is fired and I get the event. However, the sprite moves the rigidbody and I have trouble restoring it ...
0
votes
1answer
643 views

How to detect that user has touched UI canvas in Unity 4.6?

In my 2d game I have a HUD with some buttons on it. To make it I am using new UI system, which was presented in Unity 4.6. When user is touching button, I am running method, which was declared in ...
1
vote
1answer
50 views

How to make sure that all the UI elements were the same size on all screens in new Unity 4.6 UI system

I have made a HUD for my 2d mobile game with the help of the new UI system, that was introduced in Unity 4.6. But when I am trying to play game in Unity editor, the UI elements have normal size, but ...
0
votes
1answer
53 views

How to create particle system by script

I have created a gameObject called "Sphere". After 5 secs the gameobject starts rotating. Along with the rotation I need to emit partical from the object. How can I do this?
1
vote
2answers
123 views

What is the cause of this lighting artifact on my dynamic terrain mesh?

I am generating my own terrain mesh in Unity, using pseudo-random noise to determine the height. I construct the mesh using quads, each quad is composed of two triangles. All seems to be going well, ...
2
votes
2answers
92 views

Jumping higher when the player touches a trigger collider in Unity

Im using Unity engine to create a 2D platformer. My character can single/double jump, this works fine everywhere except when i am in range of a collider with a IsTrigger set to TRUE, then my character ...
1
vote
2answers
110 views

Restricting character movement to “rails”

I'm building a Pacman clone in Unity 3D and am now thinking about how to restrict the movement of the player to the hallways that the map is made up of. Basically, the player is only allowed to ...
0
votes
1answer
59 views

How to reference UnityEditor in external DLL when using UnityVS, successfully?

So I'm trying to put my scripts and custom inspector editor scripts in two external DLLs and I'm facing a problem on my Editor DLL. First of, I'm using UnityVS with Visual Studio 2013 Ultimate. I ...
1
vote
2answers
224 views

How can I highlight and move to adjacent tiles in an isometric grid?

I trying to create a turn-based strategy game where you move a game object from one tile of a grid to another tile near it. I have created the grid using sprites and game objects but can't sort out ...
-3
votes
1answer
62 views

Direct raycasting from moving point A and moving Point B

I am attempting to raycast from Point A to Point A (both moving points). I dont understand the comcept of raycasting (direction). Update() { player = GameObject.FindGameObjectWithTag ("Player"); ...
2
votes
1answer
89 views

2D collision of thrown objects in Unity

I am currently working on a game inspired by traditional 2D Zelda games ("Link To The Past", etc.) in Unity using the 2D settings. I am looking for the best way to handle objects that the character ...