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)

0
votes
3answers
67 views

Math.Clamp won't limit my position until movement is ceased

The program is in a top down view, with Y going up (or forward depending upon how you see it), and X going from left to right based on the camera view. I am attempting to set the minimum and maximum ...
0
votes
0answers
68 views

Visual Studio 2015 Unity Tools intellisense error

I just downloaded Unity 5. I use Visual Studio Community 2015 to edit the code. When i edit JavaScript files in VS it shows some of the Unity code as errors (for an example the #pragma strict). Also ...
0
votes
0answers
18 views

Photon Connections without Concurrent Users? Or other networking?

I am going to be making a multiplayer game and use http://pupnp.sourceforge.net/ for setting up connections without having the player to port forward. The game will let you make or join a room using ...
0
votes
1answer
41 views

Very less vertical transformation

Im using pretty basic code here charcter.transform.Translate(Vector2.up * speed * Time.deltaTime); Im using rigidbody 2d and I'm creating a platformer. When i press the button the character ...
0
votes
1answer
63 views

Handle two different touch gestures at same time without overlapping

I'm trying to create a Character touch controls for 2d platform. In my script Im using one horizontal swipe and hold touch gesture and one vertical swipe gesture without hold.Both are different ...
2
votes
2answers
290 views

OUYA and Unity set up problems

I'm having trouble with the Unity / OUYA plugin. I'm using Unity 4 with the latest update on a Windows 7 machine. When I open the starter kit and try to compile the plugin I get the following error: ...
2
votes
3answers
91 views

How can I avoid instantiating multiple instances of a RigidBody?

I could use a little help. I've a state machine for an NPC that does a melee attack. The problem I'm running into is that the current code instantiates multiple instances when I only need one per ...
1
vote
1answer
188 views

How to use .fbx for 2D animation in unity 2D

I am new to unity so please bear with me. I have come to know that for animations it is better to fbx format in unity rather than sprite sheets. I am using unity 5.2 and till now i created all my ...
1
vote
1answer
711 views

How to do pixel perfect movement with Unity3D?

How would you be able to make sprites move pixel by pixel in Unity3D? I've tried the following things. int x = (int) transform.position.x; int x = Mathf.FloorToInt(transform.position.x); int x = ...
12
votes
3answers
1k views

When should I use velocity versus addForce when dealing with player objects?

I'm confused about these two methods in the Unity framework. Both make the player object move, stop, change direction, etc. When should one be used over the other and when is one appropriate?
0
votes
0answers
32 views

Sprite animated position outside unity

our artist chose to animate the position outside unity because he want the precision of how the animations should look like what this means is when the monsters is jumping he literally moved the art ...
1
vote
2answers
84 views

Unity setting rectTransform on an UI Image with a Vector3, do I need to convert coords?

I am trying to build a menu with a cursor. I created the menu and that in the unity UICamera on the canvas. It looks great. I want the cursor to move so what I did was move the cursor by hand and ...
0
votes
2answers
78 views

Trying to use yield to wait for a few seconds to avoid the sounds from Interfering with each other

Ok so when my player hits a wall (Enemy tag). My player is destroyed after a certain amount of time. During this time, I disabled the mesh renderer on impact so it "appears" as if the player is ...
0
votes
2answers
85 views

How to make my Object Zig Zag

I have an object in 3D space with a certain height (y) component that I wish to remain constant. The object is a rigidbody, kinematic, affected by gravity and a trigger. So I tried this method ...
0
votes
0answers
38 views

How to create custom editor script only for one field of an object and leave the rest default in Unity?

I have a script attached to a game object. The script has many public fields and I'm satisfied with how Unity displays most of the fields for editing in the Editor. Except for a few. I'd like to write ...
-3
votes
2answers
212 views

Random AI Movement

So I'm creating a zombie game where the zombies are passive and just walk randomly all over the area when player is not near. My question is: how would I make zombies move randomly? I code in C#. ...
4
votes
1answer
331 views

How to make installable .exe file for unity games

I just completed my game but after i built the game from unity to .exe it also has filename_data folder i know it has all the resources for the game. I tried iexpress and innosetup to make the ...
3
votes
1answer
86 views

Distinguish touch gestures for distinct horizontal and vertical commands

In my script below I'm using horizontal and vertical swipe gesture to move the character but both gestures are called on a single touch. void Update () { HorizontalSwipe(); VerticalSwipe(); } ...
0
votes
2answers
150 views

Unity a ball bounce inside a sphere sometime will penetrate and drop outside

i'have made a ball within a sphere (which imported from blender, with mesh collider), see the pic after the scene started, the ball bounce inside around 5 seconds, and then the ball will penetrate ...
0
votes
1answer
78 views

Why am I getting this “tag not defined” error?

In the log, it says UnityException: Tag: car is not defined. at PlayerController.OnTriggerEnter (UnityEngine.Collider other) [0x00000] in <filename unknown>:0 I'm checking against the tag ...
-1
votes
1answer
50 views

Combining Pause and Start Menu

I got my pause menu working by using this code: using UnityEngine; using System.Collections; public class PauseMenu : MonoBehaviour { public GameObject pauseUI; private bool paused = false; void ...
4
votes
1answer
138 views

How do I expose a field with a generic class to the Inspector?

I have some utilities implemented as generic classes. I would like to have fields of these types exposed to the inspector but they appear to not display. This test code: [Serializable] public class ...
-1
votes
4answers
153 views

How do I implement an item that can hold other items?

I'm attempting to implement a "storage item" into my game. But I'm having trouble planning out how it would work. I already have an inventory system made, but this storage item is giving me trouble. ...
0
votes
1answer
63 views

Basic Moving/Anim Script [Unity CSharp]

So, I got this to do the anims for my sprite in Unity 2d... using UnityEngine; using System.Collections; public class Move : MonoBehaviour { public float Speed = 2; Animator anim; // Use this for ...
0
votes
1answer
47 views

Swipe and hold character movement not working

Heres my PlayerControl script void Update () { foreach (Touch FingerTouch in Input.touches) { if(FingerTouch.phase == TouchPhase.Began) { ...
0
votes
1answer
65 views

Keeping camera at player's back

I'm developing a 3D game similar to the Roller Ball game from Unity's tutorials mixed with a runner type game like Subway Surfers. The game uses the arrow keys for control. When the player hits the ...
-3
votes
1answer
47 views

How/where can i learn everything unity2d [closed]

I just learnt unity basics and would like to learn everything else related to 2d development beginner to advanced in less time. Because i dont want to stick to game business/development for a long ...
1
vote
1answer
715 views

Particles in particle system not being lit

I have a sprite that I want to use in my particle systems (it's just 4x4 white square). I'd also like for the particles to be lit (react to lighting within a scene). Since I'm using 2D Toolkit, I ...
0
votes
0answers
20 views

How to use camera in unity engine?

i'm new to game development, and i want to learn more about camera programming in unity. I am good in C#, so scripting is not my weak point. I dont really know how to start. Could you please refer ...
2
votes
1answer
46 views

How do I expose a field of an abstract type to the Inspector?

I have a class hierarchy with an abstract parent class. I would like to have a field of this type exposed to the inspector but it appears to not display. This test code: [Serializable] public ...
2
votes
2answers
160 views

About tiles in games

I'm trying to learn how to develop games in Unity and my base is tiled games, I would like to know if a simple tile is an image (sprite in 2D) or a game object in 3D. Since I'm trying to do some kind ...
3
votes
3answers
323 views

Unity - Tiling of a material, independen of its size

I am using Textures and Materials to tile my sprites, for instance when building a wall in my game. The problem with this is that everytime I resize the plane or size of my game object I have to ...
2
votes
0answers
75 views

How to detect collisions with a material in Unity 5?

I've got a simple car game with 3 different surfaces: grass, tar and sand. I have a basic skid smoke system, but I want the color of the skid smoke to change depending on the surface, for example on ...
2
votes
2answers
139 views

How to make your own 2D AABB collision system in unity?

I can't use the built in unity 2d physics engine for my game, so I tried to make my own using the unity bounds.Intersects, that is working perfectly but my problem is that I don't know how to make the ...
0
votes
1answer
66 views

How to Implement a Timer for my Prefab for Roll-a-Ball Game (C# in Unity)

I am trying to create a public float timer that senses when the particular prefab has not been there for a certain amount of time. Then, it will replace that particular object. The goal is to ...
0
votes
0answers
98 views

Facebook Unity SDK Share Callback Returns Success When User Cancels

Here is the code piece i used to debug: public void Share (FacebookPost post) { FacebookDelegate<IShareResult> innerCallback = (result) => { foreach (var item in ...
0
votes
0answers
45 views

Spatial based Augmented Reality with Unity

I want to create an augmented reality application that is based on a spatial / location based overlays. Similarly to Infraworks by Autodesk or Flight Radar 24, the user will hold the device vertically ...
0
votes
1answer
64 views

how to transform the position of an object

I am trying to transform the position of an object. I have totally 3 Objects and 2 triggers, objects are 1. Left_Wall, 2. Right_Wall, 3. Obstacles. 1st trigger for transform the position of an objects ...
0
votes
2answers
734 views

How to make legacy animations run in Unity in unscaled time? (Pause game related)

I'm relatively new to Unity, and I've been having a very difficult time getting the legacy animations to run in unscaled time. I need to pause my game, and as soon as it pauses, I need to have my ...
2
votes
1answer
69 views

Why is Unity UI Image color not being animated? [closed]

Animation is changing the color of an UI Image but the color only changes only in the inspector but not Game/Scene view. In this video I demonstrate the problem clearly.
0
votes
1answer
113 views

Why is FindObjectOfType(MyType) not finding anything?

Why would I get the following log? Start OpponentMotionReceiver motion receiver not found true public class ScoreAnimation : MonoBehaviour { private OpponentMotionReceiver ...
0
votes
0answers
47 views

cannot sync for connected player after spawning meteorite ( photon PUN and ufps)

did anyone run into such bug? It happens when second player connects to a game, and that's what he sees. But players who connected earlier see everything well: meteors which I spawn by master-client ...
0
votes
1answer
186 views

Unity not opening

When I start my Unity it opens up the menu where I can select a project, but when I pick a project nothing happens. The process is still running in my windows but nothing shows up. Here is my log ...
2
votes
1answer
400 views

What is the 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
45 views

Is it possible to use a Unity 3d Model with libGDX?

Can I use a 3d model like https://www.assetstore.unity3d.com/en/#!/content/36951 in a libGDX 3d game?
2
votes
1answer
87 views

Transitioning through menus in Unity: what is the best option performance-wise? [closed]

I'm making a menu manager and I'm not sure what should I do to make a transition from one menu to the other. What is better to be used performance wise? Here is the step in my mind. Simple enable or ...
11
votes
3answers
705 views

Unity - How to move a ship realistically to a point in a 2D top-down game

i'm trying to move a sailing ship to the point where i clicked with the mouse. this movement should be realistic (oar at the back where the ship moves around) so if the mouse click is left and in ...
3
votes
0answers
71 views

Unusual black squares in transparency effect after wake from sleep

I've encountered unusual black squares in semi transparent textures for a while now, usually in processes that were resumed after the computer woke from sleep. For example I've seen the effect in the ...
3
votes
1answer
192 views

Writing a glow shader

I'm trying to learn writing shaders. And I've pieced together something that is kinda working. I want to create a transparent glow around a sphere. The problem I have is that I can't seem to alter the ...
3
votes
1answer
237 views

With Cardboard, reorient player to direction of gaze

This may be a little hard to follow. I have a script set up in Unity, and attached to my CardboardMain object that allows a user to press the button on a Cardboard headset to move in the direction of ...