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
0answers
34 views

How to rewind time on just the main character? [duplicate]

I have a 2D sidescrolling game and I want the character to be able to rewind time on him if he messes up. I don't want anything else to change, just the main character's position. Any idea how I can ...
0
votes
0answers
33 views

GameObject is only rendered when it has a negative z scale

I have an orthographic camera that looks like this: I create 2d polygonal meshes that have uniform z values in their vertices. I use Camera.ViewportToWorldPoint() to map these viewpoint vertices to ...
0
votes
0answers
36 views

How do I correctly set up a Unity animation to move?

I downloaded a custom .fbx model from the asset store, imported it to my project and placed it in my scene. I then created an animator controller and added it to the object. To get the animations ...
-2
votes
1answer
44 views

How can I parse the leaderboard data returned from Google's API?

We're developing our first Android game and we want to get leaderboard data from Google Play Game Services and use the score data from the different leaderboards. I am able to use Unity's WWW class ...
1
vote
1answer
45 views

Can I set a texture as the wallpaper of an iOS device?

I have a game in Unity which creates drawings. I need to have a button which sets the drawing as the wallpaper (with permission from the user of course). Is it possible?
2
votes
1answer
104 views

In-Depth Lockstep Explanation

I'm making a multiplayer game built upon a lockstep system and I'd just like a better grasp on the concept. My main question is on how to get every command to simulate at the same time on every ...
0
votes
1answer
85 views

Mesh Generation In Code [closed]

My camera looks like this: I am trying to add 2D polygons to the screen based on the percentage that they take up of a 1920x1080 pixel canvas. Therefore, I calculate this and then use ...
2
votes
1answer
66 views

Unity3D: Disable player input but not character movement?

I'm trying to code a dash/air dash for a 2D platformer. In my character controller's FixedUpdate(), I have various if statements that cause certain actions when a button is pressed. To disable player ...
1
vote
2answers
49 views

Unity access method from separate script

I'm learning Unity3D and I'm practising accessing game object scripts from other objects. For the most part I've got it down, but I've run into a weird issue causing a NullPointerException. I've set ...
0
votes
2answers
149 views

How do I create a simple clickable button?

I've tried to attach this function to the play button. public void Play () { Application.LoadLevel("Scene1"); } I've created an empty Game Object and attached my script to it. But when I go to ...
0
votes
1answer
44 views

give a prefab clones a script from another prefab in Unity3d

I have the following : TurretBallmanager : using UnityEngine; using System.Collections; public class TurretBallManager : MonoBehaviour { // Use this for initialization public GameObject ...
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
32 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
37 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
22 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
102 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
71 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
27 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
58 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
26 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
97 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
49 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
137 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
29 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
44 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
64 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
30 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
20 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
42 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
49 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
61 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
30 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
332 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
50 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
44 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
53 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 ...
-1
votes
0answers
105 views

Unity 4.6 GUI C# - How To Dynamically handle events generated by any gui element

Hello thanks for your time! GOAL: What im trying to achieve is to create my own small event system for new ui 4.6 elements so i can manipulate them by code , in this small test project im trying ...
0
votes
1answer
39 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
28 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
140 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
55 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
56 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
34 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
82 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 , ...