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)

2
votes
1answer
221 views

Player Gravity Questions

I've made it so that all entities have complex box colliders for hit detection purposes. These entities also have character controllers on them. The problem? Gravity, or lack thereof. When the ...
6
votes
1answer
1k views

How to make Line Renderer lines stay flat?

I've noticed that as I add more vertexes to a Line Renderer line the line twists and stops being a smooth line. .GIF Here: http://i.imgur.com/hRAhCXM.gif All lines are on the same z level, even ...
2
votes
2answers
750 views

Storing Type/Game Data Within A Unity 3D Game Using An Offline Flatfile Database

I've read several documents on how to manage game type data: Would it be better to use XML/JSON/Text or a database to store game content? How to choose how to store data? Im developing an offline ...
4
votes
1answer
952 views

Unity3D [C#]: How do I use a custom inspector to expose an array of polymorphic objects to edit?

[EDIT: based on some feedback, I pruned the example down to the base functionality of the bug we are trying to solve. The description below remains accurate, but the repro has been shortened to: ...
1
vote
1answer
161 views

Responding to mouse input on game objects

I'm trying to make a simple button in unity using a cube. My plan is for when the cube is highlighted that it will move towards the camera and be highlighted in a specific color and then when it is ...
1
vote
2answers
169 views

How to prevent intepolated texture in fragment shader (Unity CG)

Think about minecraft - all the textures in minecraft have a very nice crisp pixelated look. Well, I'm trying to write a shader that will do this but it appears "sampler2d" returns some sort of ...
1
vote
2answers
141 views

How can I run a Unity game in a window larger than the desktop resolution?

I am exploring a research problem using Unity. I require a game resolution of at least 4096 x 786. There seems to be no option under build settings for setting a fixed screen size window. (The default ...
0
votes
0answers
306 views

Unity 4.6 New GUI Issue with GIT

I am using Unity 4.6 new UI. I have my project setup on bit bucket (using GIT). It was working fine but when I cloned the project on another macbook. All the unity new UI scripts went missing. Is ...
1
vote
1answer
117 views

Unity provides wrong Input value if game is started with bumpers pressed down

As the title states I am having an issue with the following. It is a pretty specific edge case but it is something I can't work around. In Unity I have created two Axes to allow me to check the value ...
0
votes
0answers
252 views

Unity C# Microphone input in Android different than on PC?

I'm working on a mobile app inside Unity, in which I need to input and repeat microphone input almost immediately.. I've worked it out and it works great when I play it from within the Unity Editor. ...
1
vote
1answer
479 views

Adding materials to a Line Renderer through code? (Unity)

I have a material that I am using to add a glowing effect to my line renderer. I can add this as a 2nd material to the line to give it a glowing effect. I want to be able to add/remove this material ...
0
votes
1answer
144 views

Unity: Smooth collision

I'm making a topdown 2D RPG in Unity. All moveable objects have Rigidbody2D-components with gravity set to 0, linear drag set to 5 and different masses. Walls are stationary boxes with BoxCollider2Ds. ...
2
votes
1answer
150 views

What is the performance impact of rendering a larger quad?

Lets say I have two planes and I textured them in blender with a 512*512 tiled texture. One plane is bigger than the other (for example, one plane tiles the texture 60 times but another only six ...
0
votes
3answers
143 views

How do I size my map in blender so it will be the right size in unity?

I am working on a fps game but I cant get the size right of my map in blender, every time I export it to a .fbx file (unity won't work if it is a .blend file) it is a super small plane floor in unity ...
0
votes
2answers
205 views

How to flick gameObject using Touch?

I've been searching for a solution for my problem for a while on the web, but i didn't find anything that work properly What i want to do I have a bouncing ball and I want to let the user flick it ...
0
votes
0answers
265 views

How to align angular velocity wit target rotation in 3D?

I'm making a space crew sim (controlling a ship) and have recently posted a question about how to calculate ETA between two rotations. I how now a new question more well defined. Background: I have ...
1
vote
1answer
2k views

Graphics Raycaster of Unity; How does it work?

I'm making a small game for the first time and enjoying it thus far. The only thing that keeps bothering me is that I can't find a human explanation of what the graphics raycaster does. What's the ...
1
vote
1answer
55 views

Where is Light in Game view

Very Basic Question.when i run the the game the game Mode is Too dark as shown below in the picture. please suggest me some Setting how to globally switch on built in light while Running the game in ...
1
vote
2answers
304 views

Rotating an object towards a target on the Y axis

I am attempting to rotate a 3D object on its Y-axis towards a target it is looking at. I have always struggled with rotations so I would like to try to avoid using Unity's built in functions, i.e ...
0
votes
1answer
148 views

Handling an item database with procedurally generated items?

Let's say you have an item database which has every item in your game. This works fine for regular items like a Health Potion, a normal Iron Sword etc, because these items have ItemID's so we can get ...
1
vote
2answers
164 views

Can I develop a game for Kinect without a Kinect?

I have to make a game in Unity3D using Kinect. The problem is I don't have the Kinect yet. I need to wait until they deliver it to me. Can I imitate Kinect's movement for debugging my app?
1
vote
1answer
178 views

Unity game in edit the scene mode all of a sudden became incredibly slow/“laggy”

So I recently have been working on a game. So far I have very few assets in the game, which are a point light, a piece of terrain (which is textured), a player controller and a tree. Everything was ...
1
vote
1answer
568 views

Is it possible to tile box colliders without causing “false” collisions in Unity3D?

This is in regards to something like a sidescroller where you have a tiled map where each tile uses a 2d box collider. If you use a 2d circular collider as an example for your character, as it rolls ...
1
vote
1answer
280 views

Problem with NGUI Unity 2D Sprite across devices

I have a problem with NGUI for Unity, using the Unity 2D Sprite objects. First, have this image: And then create an NGUI Unity 2D Sprite object in the scene. Apply this image and you get this: ...
1
vote
1answer
348 views

Can I Debug.Log() on Android without all the callstack spam?

I get this: I/Unity ( 1908): Serialized file length: 754 bytes. I/Unity ( 1908): UnityEngine.Debug:Internal_Log(Int32, String, Object) I/Unity ( 1908): UnityEngine.Debug:Log(Object) I/Unity ( ...
0
votes
1answer
120 views

How to calculate the estimated time of arrival and control signal between two quaternion?

I'm trying to wrap my head around a control algorithm for a space game. If the user sets a target rotation I want to get a ETA counter and show the engine output. The only input to the system is a max ...
0
votes
1answer
101 views

Unity and Chartboost loading problems

I implemented chartboost in my ios game and locally it wors great. I can receive ads. Now my game is online but in the google analytics I get only error messages from the game, meaning the ...
0
votes
3answers
125 views

Backround turning, follow the character

In my Unity2d-platformer, I need background to follow the character, so I just attach it. And when character turn left from right (or right-to-left), background turn too. How can I make my ...
0
votes
1answer
112 views

Migrate from NGUI to Unity UI

I used NGUI 2 and NGUI 3 for our UI. Now want to upgrade to Unity 4.6 and migrate all NGUI to Unity UI. Is there any tools? What's the best practice?
0
votes
2answers
51 views

Speed dependent arc question

I'm currenlty working on an assignment and would appreciate any sort of help on the following implementation The question follows We are tasked to implement some heuristics but one of them is ...
2
votes
3answers
371 views

Creating a unit selection box in Unity (2D)

I've been trying to get my head around how to create a selection box for a selected unit in a 2D top-down type game. When you click on a unit, a small box would appear around that unit based on some ...
0
votes
1answer
150 views

Unity light object not affect some parts of a 3D model

So far I've used Unity only for 2D projects. But now I need to implement a 3D scene in my game. I downloaded a tree model from the asset store and placed it in my scene. I couldn't help but notice ...
0
votes
1answer
98 views

Is normal mapping cpu overhead or gpu overhead?

In Unity3D Engine, I usually apply normal mapping using fragment shader. In this case, this normal mapping is cpu overhead or gpu overhead?
0
votes
0answers
76 views

Keeping object a fixed distance from the ground, buggy behavior

I'm trying to make a script that will keep my object exactly 1 meter from the ground. So far I've got the following code : using UnityEngine; using System.Collections; public class ...
1
vote
3answers
500 views

Create random polygon shapes

I want to make a random shape made out of points. I want the points to create a polygon shape. Is there a clever way to create a random shape like this? Im thinking going throug X points and giving ...
1
vote
1answer
223 views

What is the correct way to raycast on click?

I am using raycast from screen point to detect if the user has clicked/touched on something. The following fails 1/10 times; at first I thought due to the raycast missing the subject below, but after ...
0
votes
2answers
175 views

How do I access my existing script from a different script attached to a different gameobject?

I have my health(script) component on my player gameobject that gets boosted whenever we tap on that gameobject. However, I want to add a separate Gui texture button gameobject and tap on that to ...
3
votes
1answer
140 views

Unity3D - Button Slicing Problem

I'm having trouble getting my button to appear correctly, as you can see in the image below, the right and top sides are stretched out and not displaying properly. I cannot figure out if this is a ...
1
vote
0answers
104 views

How to project a foam trail on dynamically changing mesh

I am trying to create water, and right now I got it through dynamically generating waves on a mesh. But now I want to make my boat manipulate these waves, and cause a Kelvin Wake on top of this. ...
0
votes
0answers
193 views

Best way to place sprite (which collides) on the top of screen

My 2D game is being developed for different resolutions (iphones/ipads). Somewhere I have the code to handle multiple resolutions(btw is it a good approach?): int defaultWidth = 1536; int ...
2
votes
1answer
431 views

NAT punchthrough failed

I finished my game while I was unaware of this error since it only shows up when I disable "WIFI" on my phone and testing it with 3G and 4G. Otherwise, when both devices are on my personal network ...
0
votes
2answers
789 views

How do I add a gameobject to a prefab's script's public gameobject field in Unity? [duplicate]

Okay, I have a prefab with a script. It has the public field gameobject, and I see that in the inspector. When I try to drag an object from the scene into that slot, I'm simply unable to. No error or ...
0
votes
2answers
76 views

Camera position and angle different when running inside Unity and when running on Android

On Windows, running Unity 4.6.1p5, my simple game with only a cube, camera and light looks like this but under Android (Gingerbread on a 5 inch Galaxy Player) the cube appears lower down, slightly ...
1
vote
1answer
64 views

Fire an event while the mouse is down within my box 2d collider in Unity

The method OnMouseDown() is called once when the mouse presses my box 2d collider. Is there a method that keeps firing while the mouse is still holding the button down inside the collider? Something ...
-1
votes
1answer
361 views

Can't post from Unity to Facebook feed properly

I'm using Facebook SDK for Unity. I'm posting to the user's feed with the Feed function. According to Facebook, I do not need any permission for it. "Sharing stories via Feed Dialog does not require ...
0
votes
1answer
607 views

Screen record in unity3d

How to do screen record in unity? I want to record my screen(gameplay) during my running game. That should be play/stop , replay , save that recording on locally from device, open/load from my device ...
0
votes
0answers
60 views

how to create a responsive scene

I'm currently creating a 2d android,IOS game using unity engine ,I'm testing the game on a nexus 5,Iphone 5s device,Everything till now is working fine and i am pretty happy with the result ,but the ...
1
vote
1answer
79 views

State system and animation of derived classes

I'm trying to get some kind of state system for my game objects. I have a base Actor class that is derived by classes like Policeman, Informant or Brawler. Each of those classes describes different ...
0
votes
2answers
107 views

Cube goes through objects

I have Unity Pro 4.6.1 and I am trying to make a cube move with the arrow keys. Here are the barriers before I move the cube: And here's when I move the cube (the problem): I don't want the ...
0
votes
1answer
186 views

change sprite color from properties of parent object in inspector

I have a compound GameObject that is made up of 5 sprites name dot1 till 5. I'd like to have a little script on the parent object that would allow me to change the colours of the child objects from ...