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)

2
votes
0answers
47 views

Transparent diffuse fails to render from all viewing angles

I'm rendering this chunk as a Unity mesh and I have just one material (with alpha) which is applied over all the mesh. Everything in the chunk is automatically generated at runtime, so it's not ...
2
votes
1answer
55 views

Lidgren peer to peer

I am currently integrating Lidgren into my Unity game. I need to move away from the built in networking capability in Unity because of the style of game I am making, basically MMO, I will have far too ...
2
votes
2answers
200 views

Problem loading level layout from file in Breakout clone

I'm working on a Breakout clone and I decide to use files as method to load level layouts. The file is something like this: N,N,N,N,N N,N,N N,N,N Only indicates what type of brick I'll ...
-2
votes
1answer
67 views

if statement is executed even when condition is false [closed]

I've made some code that is triggered when the player is in range of the enemy. Everything was working fine until I tried to implement a condition when the countdown reached zero. I made a method ...
0
votes
1answer
70 views

Unity Guitext object always triggering a collision - 2D

I have a guitext object which I can drag. I have attached a 2d rigid body. I have also attached the collider with the following code: void setCollider() { Rect box = ...
2
votes
0answers
64 views

Aligning pathfinding to the center of tiles?

I'm looking to achieve tile by tile movement in a project I'm working on. I employed the use of the asset Simply A* Path-finding to allow a unit to navigate the terrain. Since the tiles are ...
1
vote
2answers
72 views

How to edit colliders in Unity2D

I can edit colliders by holding down the shift key. But when i add a second collider, the shift key always selects the first one. And there is no "Edit Collider" button in the editor (Win/4.5.4f1). ...
0
votes
0answers
100 views

Unity 2.5D Character Movement

I'm wondering if anyone can point me in the right direct as to how to take a 2D character/sprite in Unity and have said character turn corners in a 3D style. Solutions or resources welcome.
1
vote
0answers
50 views

Square tile navigation unity

I'm looking to generate a grid style navigation system in Unity. I have created a map in Tiled and am unsure how to continue considering the tiles will have different properties. The closest example ...
5
votes
1answer
111 views

Multiple SpriteSheets break batching

The problem: I can't fit all my 2d animation sprites for all units and environment in 1 spritesheet. Everything batches fine until I use two spritesheets... I noticed the following : all units from ...
0
votes
1answer
45 views

In Unity how can I know which direction is the screen auto-rotated?

From the Screen.orientation description I get If the value is set to ScreenOrientation.AutoRotation then the screen will select [...] automatically as the device orientation changes. This seems ...
0
votes
0answers
48 views

Very strange trigger behavior in Unity2D (4.5)

I am developing 2d platformer and I've faced with a very strange triggers behaviour in Unity. I have made the enemy that can throw objects into main player. So I have made two empty GameObjects with ...
-2
votes
0answers
25 views

What licenses will I need for publishing my game? [duplicate]

Me and a friend have started developing a game in unity and now it's time for getting models for our games, and the question is, if we want to use for example 3ds Max for making the models for our ...
1
vote
0answers
44 views

Unity 3D Photon Network wait for all buffered RPCs to be called

I am having a lot of fun with the Photon Network asset, and I'm having this issue where I need to instantiate the players at different spawn spots, but not in a random way, instead I thought it would ...
0
votes
0answers
39 views

(Unity 3D) Why are bone colliders with an Animator Controller so finicky?

I have an NPC with colliders parented to its bones using the Unity ragdoll wizard. It also has an Animator Controller. The problem is, sometimes those colliders just don't work right. They're targets ...
4
votes
2answers
71 views

What's the point of [HiddenInInspector] (as opposite to [NonSerialized])?

I understand the difference between [HiddenInInspector] and [NonSerialized], what I'm missing is the use case for [HiddenInInspector]: so far every time I've encountered it, it was used by developers ...
1
vote
2answers
91 views

Trying to better understand Unity gameobjects

New to Unity, but develop in C# normally. I can't seem to get how / why / where to grab certain elements. For simplicity, I have a top-level game object, say a cube. I add a sphere to the scene as ...
0
votes
0answers
53 views

Implementing a group formation behavior

I am trying to implement a group formation behavior where all the units in my group follow a leader and maintain their position throughout. So far I am able to move them, rotate and follow the leader. ...
0
votes
1answer
55 views

Can't go above max speed with RigidBody2D.AddForce()

I'm having trouble making a character move faster than a certain limit using RigidBody2D.AddForce(). My game is a top-down 2D game (constrained to the x/y plane). I'm using a float 'MovementSpeed' to ...
-1
votes
1answer
41 views

Finding and reading a script on a mouse-selected GameObject

I can't work out how to access and read changes in a script of a gameObject that has been selected. The script selects enemy objects with right mouse button and player objects with left mouse button. ...
2
votes
0answers
35 views

Copy a folder in Assets/Resources folder programatically depending upon a constant

I have a Unity3d project in which I have 200 games and some 350 scenes. Now I want to make separate builds for each game. All my assets are present in Assets/IgnoredAssets/ABC folder. To include these ...
4
votes
2answers
265 views

How to properly do top-down aRPG melee attacks?

I'm reposting this from my own thread in reddit's gamedev community, since there were too few responses: I've been looking for some info on that, but I mostly find articles on the design of such ...
-1
votes
1answer
34 views

Recording time since last collision

I am trying to record time since the last collision happened.But this is not working as I expect it to. So, numberLimitOfCollision is equal to 0 only in the begining, Basically, what I am trying to ...
1
vote
0answers
131 views

Unity 3d 4.6b New GUI system doesn't take touch when already a touch event is occurring in 3d scene

I know this is beta version but.. I have a Canvas->Button which works fine when I tap it normally. I have a joystick in my scene which is drawn by separate camera other than mainCamera. now, while ...
0
votes
1answer
43 views

Downloading 10 images and storing their data with WWW

I would like to download 10 images, and store their texture data into my list. I don't really know how to do that - I heard that for this you use the WWW class, so I went: List<byte[]> ...
1
vote
1answer
58 views

Why are shadows not snapping to the objects?

I'm using a directional light in Unity to cast shadows. However, the shadows don't appear to be "snapped" to the objects creating them. The object appears to be floating in mid air while it actually ...
-2
votes
2answers
94 views

How to increase speed of GameObject? [closed]

I'm making pong game in unity3d with monodevelop(c#). I want to increase speed of ball when it touch ends of paddle corner. my ball script: using UnityEngine; using System.Collections; public class ...
8
votes
1answer
597 views

Why is my custom Texture2D blurry?

Have some WWW object downloading a .PNG image. ((SpriteRenderer)renderer).sprite = Sprite.Create(request.texture, new Rect(0,0,100,100)); My sprite looks fine. Now, let's be a bit ...
1
vote
0answers
26 views

Can I create a Sprite Asset using a downloaded Texture at runtime?

I know that Asset Bundles exist, and I'm already taking a look at them. But I'm still interested in this particular approach: I am interested in downloading a .png image from the Web, and then ...
1
vote
1answer
95 views

How to make prefabs independent?

I'm working on a Unity's Project and I want to modify a prefab, more precisely I want to change the texture of a prefab. The problem is that my modification is applied also to other prefabs. I read on ...
3
votes
2answers
159 views

Where/how do I store configuration files in Unity development?

I am transitioning from working with cocos2d-iphone to Unity. One particular thing I loved were the .plist files: you could easily put any sort of configuration data you wanted: for game levels, ...
2
votes
2answers
58 views

How to unpause a particular gameobject in unity?

Say, I have a GUI Menu attached in a game scene. The game will be in pause state by default. I did it by setting "Time.timescale=0.0f"; I want my game to unpause only when Play button clicked. My ...
2
votes
1answer
31 views

How can I add a batch of sprites to a list in Unity's inspector?

I have a C# script with a public property: List<Sprite> someSprites; I would like to add 20 sprites to it, from the inspector window. However, it seems like the only way to do so is to drag ...
1
vote
2answers
107 views

Why should I use getcomponent?

I have already referred the animator by using the statement, Animator anim; But,What is the use of getcomponent in awake() function.What happens without it.
1
vote
1answer
156 views

What does Quaternion.Lookrotation do?

I have this code, if(Physics.Raycast(camRay,out floorHit,camRayLength,floorMask)) { Vector3 playerToMouse = floorHit.point-transform.position; playerToMouse.y=0f; Quaternion newRotation ...
0
votes
2answers
47 views

Changing distance after some time on OnGUI Unity

Though I am using IEnumerator to calculate the distance travelled value, the distance is updated very frequently, how can I change that? and why exactly increasing the time in WaitForSeconds function ...
1
vote
1answer
85 views

How to rotate object not from it's center point but from it's another point?

I am new in unity and I am developing a game where I want to rotate my object I try this code for it. if(Input.GetMouseButton(0)){ if(Input.GetMouseButtonDown(0)){ ...
3
votes
2answers
334 views

What is the pixels to units property in Unity sprites used for?

I'm starting to learn Unity for 2D development. So, I am importing several sprites into the game, and I couldn't help but notice that there is a "pixels to units" property, by default on 100. I ...
0
votes
1answer
52 views

Terrain (mesh) textures in Unity - blurry?

I've created a 3D mesh in blender which will be used as a terrain in Unity. Additionaly, I created a 900x900 texture which I'd like to apply as material to the mesh. However, unlike with the normal ...
1
vote
1answer
77 views

Correct multiplication order for a 2D Matrix

I'm currently trying to create a camera and entity/model matrix for my 2D game similar to that of Unity3D. I've already tried to find answers to this question on stackoverflow/gamedev but i couldn't ...
0
votes
0answers
18 views

calculating avoidance forces for similar objects unity [duplicate]

I am trying to work on collision avoidance for my troops. Currently all my troops have their target object as the leader who is wandering in physical space. The troops just follow the leader but they ...
1
vote
0answers
49 views

Unity Free Inverse Depth Mask?

How would it be possible to create an inverse depth mask? In this case, I refer to a depth mask as a shader attached to a mesh that 'pokes a hole' through the current camera layer to let you see the ...
0
votes
0answers
38 views

Gameobject sprite size wrt NGUI sizes

I'm working on a project that targets mobile platforms. I'm facing problem with asset sizes. I set the UIRoot as fixed with manual height of 1080. Next, i imported a simple black square (500x500) and ...
0
votes
1answer
86 views

Moving gameobject with animation according to my script Unity3D

I am developing a game with Unity3D with an horizontal list of elements which you can move with arrows. Here you can see an example: I have created animations in order to modify the alpha value of ...
0
votes
1answer
47 views

Move camera from wherever camera is to pinned point

So, I need to switch/ move/ animate camera from point X (not point A,as I don't know where the camera is at that momemnt) to point B (place where you want your camera to move). This is for ...
0
votes
1answer
76 views

How can I make an object change direction?

I have a moving cube that, when it moves over an arrow, should change its direction to the direction of that arrow. What would I need to do in order to accomplish this?
0
votes
0answers
51 views

Unity - 2D - Scaling to fit between two objects

The game is a top down 2d shooter and I'm facing trouble in doing this : - I got a player 2D ship - The player fires laser, which is a long thin image with box collider attached. - What I want is that ...
1
vote
1answer
55 views

Pause on scrolling backgrounds

I have a typical parallax backgrounds. They are scrolling by public float Speed=0f; void Update () { renderer.material.mainTextureOffset = new Vector2 (Time.time*Speed,0); } I have a ...
0
votes
1answer
76 views

How to show NGUI menu in the upper of a Game Scene?

I am new to Game Development. I made a menu with NGUI plugin. I have a background image in the behind of this menu. Now, I want to place my Game Scene in place of the background image. I have tried in ...
1
vote
1answer
80 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 ...