0
votes
1answer
33 views

Animation not playing correctly(or at all)

Im created this script which plays animation/s when the player goes close to it and presses e while aiming at it.For some reasons only the first animation is playing,not the second one.Is there any ...
0
votes
1answer
31 views

Generating a particle effect on top of a GUIElement (Unity)

I am working in Unity on a 2D project which is using C#. I have a number of guitextures which are hearts in order to create a sort of life meter. I would like when the player loses a heart for the ...
0
votes
1answer
39 views

Unity3d : Animator canceling script

I create a sway script for my flashlight and attached it to the gameobject(flashlight). Now the problem is that when I enable the animator in the gameobject(flashlight) the sway doesnt work,but when ...
0
votes
0answers
23 views

Unity Android Unable to convert classes into dex format AdMob

I'm a beginner Unity programmer (school-age), so I don't know that much about the system. On its own my app compiles fine, but when I implement the AdMob SDK (Google) 2.1, I have the following error ...
0
votes
0answers
27 views

I have a bones misassignment and I need to know how to fix it [closed]

See here for the problem. Youtube-Video The legs are rotated over each other and the animation looks spastic. What is the misalignment's cause and how to fix it.
0
votes
1answer
36 views

How to use sprite as font in Unity?

I've started working on my first game in Unity; It's very simple, there's a spinning block in the middle, and there are spinning blocks coming from all sides. When they hit the middle block, you lose ...
0
votes
2answers
77 views

Make a square flickering at a preset frequency

I'm working on a medi-sci project where I want the patient to use brainwaves to exercise control the environment. The environmnet is a 2D game where the game character is to be controlled by 2 ...
-1
votes
2answers
133 views

How can I read inputs from buttons at the same time?

I am using the tk2d toolkit. For my project, each player has their own button. I need to be able to get both buttons inputs (at the same time) so that I can figure out which up event first. I run ...
1
vote
1answer
124 views

How to compress Unity apk output?

I made a game with Unity but the size of .apk file got so large, it is about 70mb... Is there some way that I can compress my apk file?
0
votes
1answer
69 views

Make GuiText responsive

I'm using C# code to make a responsive GuiText. I was abel to make a responsive GuiTexture, but I'm struggling with doing the same for a GuiText. Code for the responsive GuiTexture using ...
-2
votes
1answer
111 views

Unity3D - Clones won't get destroyed by script

I need some help making this script work. #pragma strict function OnMouseDown () { Destroy (gameObject); } Basicly what the script does is that it destroys the objects that the player clicks on.I ...
0
votes
4answers
153 views

Scripts won't affect clones - Unity3d

I made a script which swaps two game objects on click.But the script won't work because the objects are actualy clones of the original prefab. This is the script (UnityScript): #pragma strict var ...
0
votes
1answer
70 views

I want to make a pause button on the scene

I want to make a pause button on the scene. If I press the button it will show the guiTexture with a variety of buttons with each different script. So what steps should I take? 1. How do make it so ...
0
votes
0answers
57 views

Assigning valid moves on board game

I am making a board game in unity 4.3 2d similar to checkers. I have added an empty object to all the points where player can move and added a box collider to each empty object.I attached a click to ...
0
votes
1answer
37 views

Unity - Invert Movement Direction

I am currently developing a 2,5D Sidescroller in Unity (just starting to get to know it). Right now I added a turn-script to have my character face the appropriate direction of movement, though ...
3
votes
1answer
74 views

curve objects in unity3d to wrap around an invisible cylinder?

Is there a way to transform objects in unity3d so that they can become curved? Imagine that I wanted to create a rectangle that wraps around an invisible cylinder, or that I wanted take a sprite image ...
2
votes
2answers
206 views

How do I get mouse x / y of the world plane in Unity?

I am trying to make a tiled landscape. The terrain itself is not made from tiles but the world has a grid which I define. I would like to place boxes/rectangles which snap to this grid, at runtime, ...
-1
votes
4answers
175 views

How to increase the game “level” after certain amount of objects spawned?

The game is supposed to increase the level by 1 every 10 spawns of an object, using totalShots % 10 == 0. So, when totalShots is equal to 10, 20, 30, etc. the level should increase by 1, however, the ...
0
votes
1answer
89 views

Free Look Camera Like Arma 2 while pressing ALT [closed]

I'm trying to create a simple script that give me the possibility to rotate the camera while pressing a key. So, in a pseudo-code way, how I can intercept the Input event and limit the player's ...
5
votes
4answers
455 views

Does Unity let you code in Java?

I am fairly new to Unity3D experience , but I have a very good knowledge of Java and Android development. I am really confused that if Java is at all needed for developing android applications? I read ...
1
vote
2answers
159 views

How to change transform.position.x after a state is changed?

When I press attack button, player will change to Normal Attack state to perform Normal Attack animation and you will notice the player seem like step back a little bit as the width of sprite for ...
1
vote
1answer
170 views

How do you set the target location for a navmesh using a GameObject?

I am trying to get a GameObject to navigate through a map and get to the exit. I have created a navmesh for the map and given the player GameObject a navmesh agent. The exit is marked with a empty ...
2
votes
2answers
254 views

android game development using unity 3d [closed]

I want to learn android game development. I dont have any programing knowledge. So should I learn JAVA and eclispe to develop games for android. Or should I learn Unity 3d. And is knowledge of java ...
0
votes
1answer
153 views

Increase animation speed according to the swipe speed in unity for Android

I have the animation done through Maya and brought the FBX file to unity. Here is my code to calculate the speed of the swipe: Vector2 speedMeasuredInScreenWidthsPerSecond ...
0
votes
1answer
509 views

Unity3D animation trigger reset

How can I reset conditions for animations using an animation controller? I have a door that will open when a boolean property in a script is set to true. This then calls setTrigger on the animator to ...
2
votes
2answers
95 views

Finding diagonal objects of an object in 3d space

Using Unity3d, I have a array which is having 8 GameObjects in grid and one object (which is already known) is in center like this where K is already known object. All objects are equidistant from ...
0
votes
1answer
169 views

How to play a video on a TV model inside a game?

I am new to Unity3D. I need to know how can I play news when I switch on a TV using any scripting language in Unity3D ?
2
votes
2answers
373 views

Retrieve the original prefab from a game object

How would one proceed to retrieve the original prefab used for instantiating an object? In the editor these two functions work : Debug.Log(PrefabUtility.GetPrefabParent(gameObject)); ...
1
vote
4answers
357 views

Get GameObject to bounce of colliders [duplicate]

I am making a Atari Breakout game with unitys 2d tools and I need to get the ball to bounce of colliders in the scene. If you havent played the game before how it works is if the ball hits the wall at ...
1
vote
2answers
872 views

Retrieve variable from another class and send to another scene in Unity

Sorry for asking a noob question, but I have never used c# in Unity, only unityscript. Basically I have a public int score variable stored in Players Class. I need to retrieve it in the following ...
-2
votes
1answer
201 views

Trying to access another class that is outside my Unity script but casting is failing

I am trying to reference a class that is outside my unity script using GetComponent. private FlyThroughCamera camera; void Start () { camera = GetComponent(typeof(FlyThroughCamera)) as ...
4
votes
1answer
244 views

Why do my velocity estimates have such a large margin of error

I am writing a script in unity that applies a force to the object to advance it a set distance in an environment without friction or drag, producing a cosine force curve. However, as the target ...
0
votes
2answers
88 views

Unity3D JavaScript/.NET code throwing compilation error with a List-thingy [closed]

So, I do this: var intlist:List.<System.Int32>; intlist.Add(1); And where I say intlist.Add(1) I get: NullReferenceException: Object reference not set to an instance of an object Weird, ...
0
votes
1answer
166 views

Make Gameobject Stand On Surface Facing Certain Direction

I want to make a biped character stand on any surface I click on. Surfaces have up vectors of any of positive or negative X,Y,Z. So imagine a cube with each face being a gameobject whose up vector ...
2
votes
1answer
955 views

How to get all keys and values of the PlayerPrefs in Unity?

I'm storing player name and scores in the Unity PlayerPrefs. I'd like to list all the names and scores stored in PlayerPrefs and display a high score page: Is it possible to display all the keys ...
0
votes
2answers
897 views

How to display a GUI text at run time in unity?

I'd like to display a GUI text at run time in my game for a second, so I want to know if it's possible to add or remove a GUI label to the scene at run time?
0
votes
1answer
332 views

Making a new instantiated prefab as a child for existing GameObject

I've been searched about how to make these fruit to move as the basket movement if it collided with it, and I've been found that if I want to perform this I've to let these fruit to be a child to ...
1
vote
2answers
1k views

How do you make the first person object the main camera?

How can a first person object character be made to be the primary viewing camera in unityscript? Do I remove the main camera? or just turn one or the other on/off?
-2
votes
1answer
105 views

How to keep a GameObject from dropping?

I am applying the following script to first person object: function Update () { var mountain : GameObject; mountain = GameObject.Find("QuantumCold_B"); ...
-2
votes
2answers
161 views

No appropriate version of 'UnityEngine.Transform.RotateAround' for the argument list

Assets/CircularOrbit.js(11,26): BCE0023: No appropriate version of 'UnityEngine.Transform.RotateAround' for the argument list '(UnityEngine.Vector3, System.Type, float)' was found. Here is what I ...
2
votes
2answers
323 views

How do you reference one game object from another?

I am trying to reference a game object that was created in the editor and added to the scene (not created dynamically). How can I reference this object in a script added to another gameobject? For ...
1
vote
1answer
234 views

How to circle an uneven object with Camera at a fixed distance?

Unity3d. I am trying to move an object with Camera around a fixed terrain (Mountain), while staying an set distance from its edge. I have the camera set to lookAt the mountain, and I want to circle ...
0
votes
4answers
912 views

sample project that mix unityscript and c#

I like the simplicity of unityscript, at same time I also like the plenty of c# library and open source projects. I prefer to put my model/controller/logic flow in unityscript using standard unity3d ...
-1
votes
2answers
128 views

UnityScript generating UnityEngine error

I have the following code set out for a simple animation in Unity: #pragma strict function Start () { } function Update () { if (Input.GetButtonDown("KeyCode.W")){ ...
0
votes
1answer
360 views

Detecting if “Wall” To The Left or Right Of Player Unity3D

I am working on a 3D Platformer in Unity3D and I need to prevent the player from going through walls. The movement for my player works like this: (A bird-eye-view representation)The areas the ...
1
vote
1answer
628 views

Unity3d how to show an image downloaded from HTTP

I am bit new to Unity3d. I am fine with any solution either of the scripts. Can we render an image in unity3d (which we have to download from HTTP path)? If yes then how or do you have any reference? ...
0
votes
1answer
285 views

Quit the application when clicking cancel button of Alert View in C#

Can someone guide me as to how can I make an application quit when you press the cancel button of an Alert View in C# code? Thanks I forgot to add that I am trying to quit application on clicking ...
2
votes
1answer
313 views

Translating a terrains position using input in Unity 3D C#

I am trying to make a terrain in Unity move, but im having trouble. Here's the code i have. using UnityEngine; using System.Collections; public class NewScript : MonoBehaviour { Camera camera; ...
0
votes
1answer
610 views

Unity3D GUILayout Window Wont Show Components

I am fairly new to Unity, but picking things up quick. This is actually one of the first problems I have come across that has me stumped. I am trying to print a good amount of components onto my GUI ...
1
vote
1answer
368 views

No intellisense on my classes

I've been using Monodevelop's current version and Unity 4. I don't get intellisense on the classes I've created but I do have intellisense on classes that are in Unity's framework. Bug or its just as ...