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
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
43 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
70 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
52 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
51 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
39 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
258 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
117 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
56 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
93 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
596 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
93 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
158 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
57 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
105 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
149 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
296 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
76 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
48 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
35 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
83 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
75 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
46 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
75 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
78 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 ...
1
vote
1answer
61 views

Objects don't instantiate at mouse position

I'm trying to get the player to shoot a projectile at the mouse position, however the projectile is shot in weird directions (http://gfycat.com/BothFluidHoneyeater). Here is relevant part of my ...
0
votes
2answers
80 views

animation control problem

I have a list of .FBX object.When I drag that .FBX into scene its corresponding inspector Animation component(fig 1) appears but when I drag some other .FBX object into the scene the Animator ...
-3
votes
1answer
120 views

Game Lagging due to too much details [closed]

I'm making a car racing game where you drive around hills. The game has some performance issues. At some point it starts lagging badly. After one day spent on this, I realized that when the car ...
1
vote
1answer
53 views

Wandering motion in Unity

I am trying to come up with a smooth wandering motion for my game-object using Unity. What I currently doing is rotate the object by some random angle calculated every 1.5 second delay. But I am ...
5
votes
1answer
468 views

Unity3D - How to tessellate 2D sprites?

I use dynamic vertex lighting on 2D sprites. On larger sprites the lighting is uglier than on smaller ones. This is because every sprite is just a quad of two triangles. Not enough vertices there for ...
0
votes
0answers
38 views

Is there a way to use a plugin with the free version of the Unity3D editor on OSX?

I'm making a plugin for Unity3d. On windows you build a .dll and put it in Assets/Plugins. This is only supposed to work with the pro version of unity but you can get it to work with the free version ...
0
votes
1answer
117 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, ...
0
votes
1answer
43 views

Shared Material

I have this simple script, so the user touch one of the cubes all cubes with same material will change color. One of this cubes must have the name of the color on it, only one, so the user touch the ...
1
vote
2answers
84 views

control animation using animator control class

I did a sample existing code to control animation using animation.I dragged and dropped a character into the scene then I added a Animator to it and added the animator controller.Below I have given ...
0
votes
1answer
121 views

Getting a pixel of Sprite at the cursor position in Unity

Summary: I've been trying to figure out a way to use simple box colliders as a nice and efficient "first pass" collider. For the "second pass", I want to check that the area clicked has an alpha value ...
0
votes
1answer
90 views

Gun Bobbing Algorithm Math Explanation

I stumbled across this really neat algorithm which I don't fully understand. It simulates a camera's bobbing effect commonly witnessed in first person shooters while running/walking. I'm mainly unsure ...
1
vote
2answers
139 views

Is Unity NGUI still that usable after Unity has add support for 2D?

I am tempted to refactor out the existing component which uses NGUI ("Next-Gen UI kit") given that what I needed is only the sprite and texture atlas. Since in the newer versions of Unity those ...