The tag has no wiki summary.

learn more… | top users | synonyms

5
votes
4answers
461 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 ...
4
votes
1answer
246 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 ...
3
votes
1answer
76 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
339 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 ...
2
votes
2answers
212 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, ...
2
votes
1answer
316 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; ...
2
votes
2answers
105 views

How to be sure that a target goal in a match 3 game level will not be impossible?

This is clearly not a coding problem but the logical one. I am starting to learn how to make a match 3 game. but there is a question rising in my mind. when i will set goal to complete the level, how ...
2
votes
1answer
974 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 ...
2
votes
2answers
404 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)); ...
2
votes
2answers
271 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 ...
2
votes
2answers
96 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 ...
1
vote
4answers
372 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
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?
1
vote
1answer
237 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 ...
1
vote
2answers
168 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
635 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? ...
1
vote
1answer
182 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 ...
1
vote
1answer
40 views

How should I pause a rotation when my character collides with a gameObject?

My character always moves forward and when he enters a turn(Trigger) this is what happens: if(other.CompareTag("TurnLeft")) { // Rotates the character in 90 degrees in 6 seconds. ...
1
vote
2answers
905 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 ...
1
vote
1answer
369 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 ...
1
vote
1answer
130 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
4answers
921 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 ...
0
votes
1answer
288 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 ...
0
votes
2answers
37 views

different Scenes but each of them loads per frame

well i want to have something like restaurant that divided in 3 sections.and the user can switch between these but every Scene loads every frame.for example the character is in the first section and ...
0
votes
1answer
21 views

Unity3d : Make prefab follow raycast hit

I've been trying to make a weapon script which fires a projectile (prefab) straight forward.I added to the bullet the first script shown here.And the second one to the main camera.The problem is that ...
0
votes
4answers
164 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
91 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 ...
0
votes
1answer
156 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
526 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 ...
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 ?
0
votes
2answers
91 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
2answers
908 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
365 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 ...
0
votes
1answer
618 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 ...
0
votes
1answer
26 views

Animation position changes everytime I play the animation

I've been trying to create a death animation for an enemy object in my scene.I created an animation on an empty object in which i placed all my child objects like hands and legs.I animated them but ...
0
votes
1answer
38 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
36 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
37 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
1answer
41 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
79 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 ...
0
votes
1answer
72 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 ...
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
61 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 ...
0
votes
1answer
76 views

Converting a GameObject method call from UnityScript to C#

Here is the UnityScript implementation of the method i use to generate a randomly tiled background, the problem i'm having relates to how to translate the call to the newTile method in c#, so far i've ...
0
votes
0answers
72 views

class instance issue

Currently, i am working on a project which deals with several parts. First, I want to interface with a Sidewinder Force Feedback 2 joystick in Unity using SharpDX and SharpDX.DirectInput libraries. ...
0
votes
1answer
176 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 ...
0
votes
1answer
343 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
votes
4answers
177 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 ...