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)

3
votes
3answers
180 views

How to create a two-way teleport system?

I'm trying to create a two-way teleport system in which players can move into a teleport gameobject, and is then teleported to another linked teleport gameobject. How I was planning to have it work ...
0
votes
1answer
61 views

Lookrotation of a gameObject in just one axis

So I am trying to orient a gameObject ( house in the picture below) which is nothing but a plane and has a 2d texture on it as you see below. The whole game is made on a hex sphere. I am using ...
0
votes
0answers
19 views

building .apk file

I have made a unity Vuforia demo project But I cannot run this Simple AR Application in Android ,I have a Pro version of Unity , when i took build of it. file -> build setting ->Android The project ...
0
votes
1answer
265 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
99 views

Calculate needed speed and object's position in Unity3d

So i'm trying to calculate object's future position so my enemy can land to it safely. Idea is that using future postion I can calculate angle and convert it to direction vector and also using ...
1
vote
1answer
32 views

How to access an animation properties from the animator?

I'd like to change the property speed of an animation from the animator. For example, I'd like the player to be able to reload faster with upgrades. So I have a basic reload animation on the gun ...
1
vote
1answer
162 views

Usage of math.Atan2 in a 3D coordinate system with Unity

I have a simple question on usage of math.Atan2 function with Unity in a 3D environment. I found this code on Unity's documentation for Math.Atan2. I changed it a bit to fit my needs. Vector3 ...
0
votes
2answers
435 views

Use both AddForceAtPoint and change velocity property?

I'm using Rigidbody2D for some game objects. It seems that when I AddForce() or AddForceAtPoint(), the game objects are mostly affected on the Y axis and hardly at all on the x axis. I don't ...
-1
votes
1answer
32 views

Float increment give wrong result [on hold]

I found something weird with my unity code : public class heroesscript : MonoBehaviour { float counter = 0; void FixedUpdate() { counter += 0.02f; print (counter); ...
0
votes
1answer
285 views

Bad quality of the sprite in Unity

I need to import a few sprites (background platform and sky) into my game scene but it seems that their quality after importing into Unity is too bad (they are blurred). The original resolution of ...
0
votes
1answer
912 views

How to make custom shaped holes in terrain

So I'm trying to create a game where you fit certain shaped objects into the hole that fits them (similar to the young children's game with different shaped blocks) in Unity 3D. I've encountered a ...
0
votes
0answers
23 views

Unity Project has code but does not run in editor [closed]

I have an .exe that displays a car.. http://gfycat.com/AmpleFaroffFlicker Supposedly this source code was used to make the exectuable, however when I open/run it from within Unity I don't see ...
1
vote
1answer
287 views

Depth write and depth test in Unity

Scenario: several objects (o1, o2,.., on) have to be rendered with the z test disable, but the z values must be written to the depth buffer. In another pass, some other objects (t1, t2,..., tm) need ...
0
votes
1answer
161 views

Unity 2D detect if swipe goes through an object

I am developing a game in unity with flying arrows that the user tries to deflect by swiping through them (changing their direction). I can get the arrows to move with the swipes, but they move no ...
1
vote
0answers
27 views

import text strings into Unity editor 3D text objects so that Scene View displays them

I am having trouble finding a solution to this problem. I want to generate the text for TextMesh.text in a custom application and import into the Unity editor so that I can then scale the text to ...
-1
votes
1answer
53 views

Yeild waitForSeconds(5.0) is not working

I am trying to call another function continuously from my Update() function. So, I have used yield WaitForSeconds(5.0); but, the it stops for the first 5 seconds and it does not stop the next time it ...
0
votes
1answer
52 views

Why does this code not update my object's position?

I am trying to move the object in my frame in Time.deltaTime. I have not taken care the speed yet but the problem is, the object is almost at position (0,0) after I have multiplied the x & y axis ...
-1
votes
0answers
60 views

Why does this code update my object's position so fast? [on hold]

I was working on make my object appearing in the screen in random position. So I used Vector3.Lerp as it was mentioned in this question. I modified the code a bit as I was getting too much error and ...
0
votes
2answers
57 views

What is the best practice for handling touch events on different GameObjects in Unity2D?

First of all I want to describe what I have in my scene. 1. Joystick. 2. Main character that has link to joystick and handles touch events from joystick. 2. Buttons. 3. Other GameObjects that must ...
0
votes
1answer
270 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
744 views

Mesh Manipulation - changing vertex data dynamically

I have am trying to achieve Mesh Manipulation of any mesh based on User Input mostly sliders, example of what I am trying to do is http://www.youtube.com/watch?v=-oMxVGmeO-s . I am not sure whether to ...
0
votes
1answer
44 views

Unity Player Prefs Deserialization not working in web build but is working in the editor

for some reason i can deserialize in the editor just fine with player prefs but when i make a web build it simply doesn't work. and since there's no real console log, i can't get any useful feedback. ...
0
votes
1answer
30 views

Unity Button Without an Image?

I want to create a button whose clickable area is only specified by a BoxCollider with Unity's new UI (similar to how you would do it from within NGUI). I can't get a Unity Button to work without the ...
0
votes
1answer
56 views

Push Notification to start a scene

I was wondering whether I can use APNs in iOS to trigger an event in my game, like start a scene without user clicking the notification. Is it possible to use remote push notifications for events like ...
0
votes
2answers
1k views

Android notifications with Unity

I'm working for the first time on a game for Android using Unity and I need to use Google Cloud Messaging to receive push messages. I've already done the integration of my Unity project with GCM, ...
1
vote
0answers
28 views

Unity Render Texture Artifacting

I'm having weird black artifacts appear on my render textures when they are transformed while the game is running. I am using a ScrollRect as a scrolling container for buttons (the buttons are just ...
1
vote
1answer
59 views

How can I make Network.RPC call a method with params object[]?

Why do I need to do this? The game I'm working on fully conforms to a component style design. Every component that a game object uses is placed on the object and is disabled/enabled based on it's ...
0
votes
2answers
145 views

Can the GUI be used to create game objects?

I want to be able to position 10 various game objects (sprites) within the area of the screen which will be dynamically sized accordingly to the screen size of the device. The area in which I want to ...
0
votes
2answers
87 views

Using Smaller Textures in Unity on Older/Smaller devices

In Unity, when you have MipMapping selected, will this cause the full size texture to always be brought into memory? I have a game which runs on high end mobile devices with ultra-high resolution ...
0
votes
1answer
84 views

Jump Issue(Unity3D)

This is my first character control script. Where a cube is my player and the objective the i want to achieve with my script are 1.the cube moves in horizontal axis till the button is pressed once ...
0
votes
1answer
24 views

Camera bounds grow along with the game scene editor in Unity

I am extremely confused by the Unity editor. Look: I have an image, And I want my camera to fit it perfectly. I have achieved so by using a size property of 540: Notice how the viewport rect ...
0
votes
1answer
168 views

Why are my target-following objects rotated the wrong way?

I writing a script that would make my players reach a target destination. It looks like this so far: private void MoveTowardsGoal() { if (Vector3.Distance (reachGoalTarget.transform.position, ...
-1
votes
1answer
50 views

Very basic question [closed]

I am trying to reverse gravity for my very first game. I am very new to programming. so I must ask, what does "Invalid token '-some character-'in class, struct, or interface member declaration" ...
3
votes
3answers
325 views

How do I access a Unity class from an Android Activity?

I have made my own C# classes in Unity. How can I access them from the Android Activity that starts the UnityPlayer? Example: I have a C# class called testClass in Unity: class testClass { ...
0
votes
0answers
12 views

Inline sprites in Unity's text?

How can I use different materials when using the tag for Unity's rich text syntax? I want to be able to have sprites that are inline with my text without having to create custom fonts. Here's what I ...
1
vote
0answers
33 views

Setting the main camera's size to be equivalent to the device's width and height

Making a 2D game with Unity. I need a way to set the main camera's width and height to be equal to the mobile device's resolution. So if you're using an iPad Mini 3, then the main camera will be 2048 ...
0
votes
2answers
295 views

Play animation when click on each player with in maincamera unity3d

I have 3 gameobjects (player1, player2, player3). I attached a script "playerscript" to these game objects. In the main camera, I have added another script called "testscript". Clicking on a player ...
0
votes
2answers
93 views

How to reverse gravity in Unity

I'm trying to figure out how script gravity reversal on collision with an object. How can I reverse gravity?
0
votes
2answers
102 views

How does Vector3.Angle compute the resulting angle?

I don't understand the concept of Vector3.Angle in Unity. Can someone please explain in detail how it computes the angle? From which two points is the angle measured? It would also be really awesome ...
0
votes
0answers
33 views

How to embed UnityScript for scripting in Unity3D?

It is useful to have parts of your game being scriptable. Many people (especially outside of Unity) are using LUA for that job. As UnityScript (as with Boo or C#) is a first class citizen why not use ...
0
votes
1answer
49 views

Casting a directional line of which an object is coming from

I want to create a directional line ( curve / linear ) depending where the direction is coming from. In some games, similar to Angry Birds, a dotted guideline is shown to provide where the gameObject ...
1
vote
1answer
264 views

Change velocity of CharacterController?

I'm trying to change the velocity of a character controller component on a Third Person Controller, but when I try to change it, the console says the velocity is read only. This is my code. ...
5
votes
1answer
196 views

Unity3D — WAV plays an octave too low on Android

I have generated a synthetic 'concert pitch A' tone from sinewaves. It plays properly on OS X player, and on my Android device. Now I record myself singing a 'concert pitch A' into the microphone as ...
0
votes
1answer
37 views

Unity: Built In Scrollable Containers?

Is there a way to get a scrollable container in Unity without purchasing a plugin such as NGUI or TK2D? I want to create a scrollable container of interactive elements that can be clicked on ...
0
votes
0answers
28 views

What causes glitches after building the game on Unity? [closed]

So I finished with a version of my game on Unity and one collision mechanic was failing in such a specific point in the game that I couldn't find the cause, given that this mechanic worked perfectly ...
0
votes
1answer
81 views

GtkRadiant to unity?

i just chose unity as my game engine an i don't like the level editor, and i really enjoy gtkradiant, its really easy and fun to use. I was wondering if someone knows a way i can use my gtkradiant ...
1
vote
1answer
136 views

How do I implement melee hit boxes for a top-down game?

For a 3D top-down game, how should I handle collision in melee combat? My game has no targeting system, so I can't use a simple distance check between attacker and target. What I am thinking is have ...
0
votes
1answer
1k views

How do I set up Unity for Eclipse?

I want to use Unity on Android. How can I integrate Unity with Eclipse? I searched this site and various forums, but found nothing useful.
4
votes
1answer
279 views

How is a Game Manager supposed to be constructed?

I'm a beginner developing games on Unity3D and now that I've become a little bit familiar with GameManagers I've been wondering about certain aspects. How do you contruct a GameManager in the most ...
0
votes
2answers
87 views

How can I move objects pixel by pixel in the scene editor?

I'm trying to find a way to move objects pixel-by-pixel(on my screen at least) in the scene editor. I tried a lot of different buttons but nothing seems to work, please tell me Unity has this ...