Unity is a highly cross-platform engine that focuses on easy art pipeline process and uses Mono as its scripting back end.

learn more… | top users | synonyms (1)

1
vote
1answer
131 views

Unity 2D camera drifts from player as speed increases

I have a dilemma that I did not have in XNA before porting my game to Unity. First-- my goal is to mimic Super Mario World 2's camera tracking in x. The camera tracks to 1 block ahead of the player, ...
1
vote
2answers
108 views

Hide part of the GUITexture in Unity

I have a Health Bar in my Unity game and it's implemented as a GUITexture with gradient image from red to green. Now I can reduce it's width from max width to 0, but is still scaled gradient. ...
3
votes
2answers
152 views

Using this.GameObject

I once read (I actually don't remember where, I'm looking for it) that using this.GameObject to call the script owner is a very bad practice. I believe it has to do with some sort of information ...
3
votes
2answers
560 views

Unity - Part of the sprite is covered in shadow

I have a sprite with Transparent/Cutout/Diffuse shader. Recieving shadows is turned on in SpriteRenderer. The light is a pointlight and I am using deffered rendering path. However when I am above or ...
1
vote
0answers
78 views

Unity crashes completely when I rotate my objects

I've started my first tiny Unity project and after 20 minutes I run into a brick wall. My goal was to create a Android 2D game with falling polygons, that you have to click and they disappear. ...
4
votes
1answer
95 views

Why are cube map axes sometimes labelled incorrectly?

In both 3ds Max (which uses a right-handed coordinate system) and Unity (which uses a left-handed coordinate system), the cube map faces labelled "left" and "right" show the view facing the opposite ...
1
vote
1answer
128 views

Scaling HUD and Camera

I wanted to display an HUD, similar to the strategic games' one (like in DotA 2, Warcraft III, Starcraft II or Age of Empires). I didn't really know how to do it, so I managed to create a Texture ...
2
votes
1answer
74 views

Unity - Quaternion - Rotate / Unrotate Error

I'm trying to unrotate a quaternion, aligning it with the axis, and then rotate it back to where it was originally. But with every iteration it seems to lose precision and just after 20 iterations the ...
0
votes
0answers
24 views

Separate shape in to a new object in Wings3D

I am working on a 3d model and I am having the following question: If you have one solid object and you have a specific part that you want to separate into a new object so you can move it and Unity3D ...
0
votes
0answers
101 views

Android Proguard with Unity3d return error code 1

I am using the proguard 4.11 with the Unity 3d In my project , I have include the unity-classes.jar in my libs folder When I generate the apk , it gives the following exception [2014-05-03 ...
1
vote
1answer
221 views

Dynamic 2d terrain loading / stitching in Unity [closed]

I'm currently working on a top down 2d game (in Unity 2d) where I'd like to build a huge terrain for the player to explore. My question is - do you have any good practices or ideas on how to chunk the ...
3
votes
1answer
405 views

How to edit key-value pairs (like a Dictionary) in Unity's inspector?

I have a spell system I am creating, the principle is as follows: Each spell is an autonomous prefab. It contains a script with some properties (base damage, duration...) that can be modified in the ...
1
vote
1answer
113 views

How can I unify the collision handling of melee/spell attacks in a networked environment?

I am trying to figure a good way to create the battle system of a game. The game is fast paced and the gameplay needs to be precise (think hack n slash) What I would like to achieve is a simple and ...
0
votes
1answer
59 views

Unity what are the rules for determining sizes of gameobjects

I am making a game for windows phone. I am a newbie so currently I am unable to understand if I have to make a simple menu for a game targeting portrait mode always, what should I give the background ...
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
2answers
169 views

Unity3d not allowing endpoint to save cookies

So I'm using an external DLL with Unity to login to a web service and access functions from it. The DLL works perfectly fine in a command prompt project, but when run in Unity I can log in ...
0
votes
1answer
61 views

Are there still favored of using bluetooth devices today in modern games for multiplayer gameplay?

I was wondering. Most multiplayer gameplay always favored by Wi-fi during team-up or to compete each other. I know that when in comes in huge groups (say 100 to 500 players or more online) in online ...
0
votes
1answer
263 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.
1
vote
1answer
94 views

Unity Vectrosity line drawing duplicates

I'm using vectrosity in my project and I'm having a problem when loading a level for the second time in a single session. When I load the level the first time, no render problem as seen HERE But ...
0
votes
0answers
97 views

Shooting on an Authoritative Server StackOverflowExecption error (uLink and Unity)

I am trying to get shooting working on an authoritative server example found in http://developer.muchdifferent.com/unitypark/Tutorials/uLinkPhysicsOnServer (ULink is used to create a scene where ...
0
votes
1answer
122 views

How do I animate Unity GUIComponents?

I want to transform my GUIWindow from the bottom of the screen to the middle whenever the user presses a button. How can I do this?
2
votes
1answer
135 views

How to display Textures, Buttons, Created with Unity's GUI (OnGUI()) to get displayed behind other objects in Scene

I am making a game in which I am using OnGUI() to make Texture. I want this texture to display behind my Regular 3D objects like cube, spheres in the scene. I have tried and searched but I am unable ...
-1
votes
1answer
61 views

Unity's pack 4 floats

Linked to: GLSL pack floats into an RGBA texture I found EncodeFloatRGBA/DecodeFloatRGBA shader functions in Unity https://gist.github.com/hecomi/9580605 Now I try to figure out how they work. So I ...
2
votes
2answers
262 views

Endless 2d runner with increasing speed, how to adjust jump behavior?

I am making an endless 2d runner with unity. my player object is not moving at all, i move all the other game objects. I have a SpeedManager script which increases the "speed" at every update by a ...
0
votes
1answer
114 views

Could you explain this calculation of tiling and offset?

I don't understand why we add +colNumber when we calculate the offset = Vector2 ((uIndex+colNumber) * size.x, which gives us x=3 for the index 13, which is the square located at the coordinates x:1, ...
20
votes
5answers
5k views

Why is an engine like Unity3D emphasized over a native library like OpenGL for beginners?

I am just a beginner in 3D games, my preferred platform is Android. I posted a question in some other forum about "What to use: OpenGL or Unity3d?" They all emphasized Unity3D and using its built-in ...
2
votes
0answers
51 views

Certain sound is played after last if within script [closed]

The idea is to make the sound work when comboTime is false. However, it works in an unexpected way: the sound works after the last if statement within ComboHud.js, which is: if (Time.time > ...
0
votes
0answers
91 views

Center attribute of BoxCollider2D not working?

I've been trying to make a laser beam for my 2D shmup. I've set up a LineRenderer, along with a box collider 2D, and I've noticed that the center of the collider is positioned at one end of the line. ...
2
votes
2answers
446 views

How can I reduce Unity's package size?

I've been experimenting with Unity3D 4.3's 2D features. I've created a simple prototype game to learn how Unity works, how to create sprite animations, collisions and all the basic things. My ...
0
votes
2answers
137 views

Unity3D Directional lights vs Draw calls

I need 2 light sources looking at a different direction as per my design. This means, I cannot flag one of them as 'not-important'! I found that because I'm using 2 directional lights, drawcalls are ...
1
vote
3answers
72 views

Identify a selected prefab rather than all of them [closed]

I am trying to play a particle effect when an enemy is killed but it seems to play on a randomly selected one rather than the one that was hit. However the enemy that was hit still disappears and ...
0
votes
1answer
131 views

Making a cube follow my finger in Unity2d? [duplicate]

I would like to make a cube follow my finger when i touch an iphone screen and drag in unity 2d.
3
votes
1answer
182 views

How can I choose a pathfinding target for a unit group and move the group to that target?

So I've got some units which should move to a specific position which is given by the player. Currently the units can move there by finding a path with the A* algorithm (to be more precise: A* ...
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 ...
0
votes
2answers
188 views

How do you create fnt (angelcode format) files from existing bitmaps?

I often gets the same problem: Someones creates a nice bitmap font for me in form of a sheet nicely formated into a png, like this: ...and i need to create the angelcode .fnt atlas for using it ...
0
votes
1answer
219 views

Unity: Instantiate an object respecting the prefab's default rotation

Simple question, I hope. I've built a variety of prefabs for an isometric shooter game (hazards, enemies, health indicator bars, popup texts, shots, explosions). All of these prefabs were ...
0
votes
1answer
47 views

Is it possible to use Unity components individually outside of the Unity Studio?

Such as physics, rendering or math libraries/objects. I would like create a project which would benefit from a few game engine related things but rather than use a mixture of separate libraries I ...
0
votes
1answer
176 views

How to get and change a mesh-renderer component in unity?

I've been making a simple brick-breaker game using unity 4.3 (In C#). I'm currently trying to make the blocks, which are stored in an array, all start with random colour properties. The colours are ...
7
votes
2answers
953 views

Constant 2D Bullet movement in a shmup

I've been following the pixelnest tutorial to make a 2D shmup (http://pixelnest.io/tutorials/2d-game-unity/player-and-enemies/). While working on this I've experimented with increasing the firing ...
1
vote
1answer
219 views

Unity3d - zooming with orthogonal camera like in Google maps

I am implementing 2d orthogonal zoom. As far as I know - in Unity3d there are no translations like in OpenGL. Taking this into consideration, I work with : camera size camera position (center) real ...
0
votes
1answer
168 views

2d OnMouse(anything) Not working

So I want to be able to click on these targets and have them destroy themselves. Right now I have many OnMouse functions all just trying to print something for testing. For whatever reason it doesn't ...
1
vote
1answer
64 views

AddComponent using a variable

I want to add a Component to a GameObject using an existing instance of the Component class. Let's say I have the class Foo: public class Foo : MonoBehaviour { int id {get; set;} string name ...
5
votes
1answer
256 views

What does Unity's “Speed of Sound”-option do?

I've been reading Unity's manual on the AudioManager's properties. Speed of Sound is the only undocumented option. What is it for?
0
votes
1answer
433 views

Prevent GUI Clickthrough

I'm using NGUI to setup my UI in Unity. Attached to the MainCamera I do have a script to rotate the camera view by clicking and dragging. It does handle mouse events using Input.GetMouseButton(). ...
0
votes
1answer
63 views

GameObject remains null for some reason

The idea is to access the function BlockWasDestroyed(); from Combo class. Instead of var combo = gameObject.GetComponent(Combo); I've also tried with var combo = GetComponent(Combo); var ...
2
votes
2answers
250 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 ...
-1
votes
2answers
133 views

Why is my C# array in unity not working?

I'm creating a 2D brick breaking game in unity 4.3. I want all of my bricks to be different colours for each game, so I've created a C# script to assign random colours to each brick when the game ...
0
votes
1answer
303 views

How can I fix “the referenced script on this Behaviour is missing” warnings?

One of my game objects used to have a script that I have now deleted on purpose. Now it keeps saying this message as a warning: The referenced script on this Behaviour is missing! How can I rid ...
0
votes
1answer
171 views

Error when using GetComponent (Object reference not set to an instance of an object)

I'm using a textmesh to check variables in real time. Thing is if I use AddComponent within Update(), it obviously starts spamming and slows the game. If I try with GetComponent the error is the ...
1
vote
1answer
37 views

Wrapping each script with classes causes errors

The goal here is to change variables from another script. Thing is that they must be in classes, so for example I wrapped this code (which is from PadControl.js): #pragma strict public var ball : ...