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
131 views

Unity ignoring the deferred shader

I've been following this tutorial to get a cel-shader working in Unity 5 along with the standard shaders (explained in the last third of the article). My issue is that when I got to replacing the ...
2
votes
2answers
58 views

Rigidbody2D Circular Orbiting

I am trying to create a basic solar system in 2D. All space objects has CircleCollider2D on them (which are required for raycasting in another script). Currently planets are childs of stars, and ...
2
votes
1answer
272 views

How do i play mp3 files in Unity Standalone?

I am making a game in Unity in which the player can select music files in their hard drive to use them in-game. I use the WWW class to load the sound files, but this only works for OGG, WAV and ...
2
votes
3answers
134 views

Game Object is Instantiating on same position

I am working on a small project . But now I have come across a problem . The problem is the prefab is instantiating on the same position . I want to instantiate a box end to end . The basic set up is ...
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
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 ...
2
votes
1answer
119 views

Unity 2D Hingejoints break under extreme force

I have added a rope to my game that is made up of multiple small gameobjects, each connected to eachother by a HingeJoint2D. Since 1 unit of mass in Unity is supposed to represent 1 kg, I've made the ...
2
votes
1answer
49 views

Rotating object around a rotating one?

I am developing a solar system animation in Unity3D. Planets rotates around sun. But ı have an issue simulating satellites like Moon. Moon should be rotating around world normally and moon should be ...
2
votes
1answer
95 views

Two 2D objects in Unity aren't colliding together

In Unity 5, I have a player shooting a projectile in aim to hit a boss, and inflict damage upon contact with the projectile. Though for some reason, the projectile and boss aren't colliding with each ...
2
votes
1answer
84 views

Unity procedural textures

I'm wanting to have an object that does random animation in Unity, within the object. Basically, I want a floor that has lights that go through it. I'm trying to figure out exactly what is the best ...
2
votes
1answer
34 views

Add navigation obstacles during runtime lags

Please watch this short video. http://screencast.com/t/vw2a5FdOOT It shows the problem. It's using the build in Unity navigation and followed the guide to build the demo in the video. Everytime I ...
2
votes
1answer
258 views

In Unity, on an Android device, CaptureScreenshot writing to Phone, but persistentdatapath linking to the external card

I'm using CaptureScreentshot() to get an image. But when I try to access it on an Android device it's giving me: Could not find file "/storage/emulated/0/Android/data/appname/screenshot.png" When I ...
2
votes
1answer
161 views

Unity Controller navigating UI

I want players to be able to use a controller to navigate our game's menus. We use Unity's new UI, and in the EventSystem have specified a controller axis for our vertical axis. However the selection ...
2
votes
2answers
2k views

Error building Player: CommandInvokationFailure: Failed to re-package resources. See the Console for details

I get following error while building to Android with Unty 5.2.2f1 (with a new&clean project). Notes: I use GPGS 0.9.27 and Soomla Core 1.2.1 and Profile 2.2.1 and maximum supported Facebook ...
2
votes
1answer
14 views

How To Find Out Which Package That Asset Belongs To?

I have just messed up my project with some conflicting plugins, so i need to clean all plugins and reimport them, but i can't make sure which files to delete. So how can i find out which package an ...
2
votes
1answer
65 views

Spawn skateboard under player

I would like to know whys in which one can spawn skateboard under player like we see in subway surfers. My best two guesses are, 1.Spawnning skateboard and then making it child of player. 2.Changing ...
2
votes
1answer
174 views

Unity 2D Sprite Bending between Hinge Joints

I've created a tentacle that consists of multiple game objects, each attached to eachother using HingeJoint2D's. Gameplay wise this multiple segmented approach is great because I can use Unity's ...
2
votes
1answer
160 views

Texture tearing with UV texture atlas mapping

The following code maps the texture from a texture atlas to a UV. The problem is I'm having texture tearing issues. Does anyone know how to overcome this problem and have any suggestions? Here is the ...
2
votes
1answer
129 views

Use Accelerometer for Roll-a-ball Movement

I'm working on maze game for Android in Unity 5.1.1f1 and I have troubles with controlling my ball with accelerometer. At start I tried: public class PlayerController : MonoBehaviour { public ...
2
votes
1answer
132 views

How to convert UV position to texture atlas pos and reapply to UV in Unity

I'm trying to apply a texture from an atlas to a mesh by reiterating through the UV array on that mesh, but I'm a bit lost on converting the coordinates. For example, if the texture required is at ...
2
votes
1answer
105 views

In Unity, why does my IndexOutOfRange exception disappear when trying to debug it?

I don't get errors when playing from Unity "Game" tab. But when I build an executable (development or not) it stucks. I get "IndexOutOfRange" exception. Which also magically disappears (yes) when I ...
2
votes
1answer
74 views

How to properly use prefabs with 2D game?

I have a concern about prefab's purpose. When I create a npc like a monster with all it's animations, script etc, I then create a prefab to instantiate it. When I want to insert different monster ...
2
votes
1answer
94 views

How can C# access JavaScript variables in Unity 5?

I have a static public boolean in a JavaScript and I want to access it in a C# script. When I tried the way that you would call a static variable from another script though, it said that the variable ...
2
votes
1answer
83 views

Realistic angular velocity for rolling sphere in Unity 5.1

I'm trying to make a small 2D game with a rolling ball/sphere using Unity 5.1, but if find the angular velocity of the ball weird. On this first image (http://imgur.com/8wBoGms), you can see the ...
2
votes
1answer
220 views

Unity 2d diffuse sprites not rendering on mobile

EDIT: Just an update, did change from sprite/diffuse to Diffuse and zordering of my level using t2dtk map stuff was backwards. Like the camera flipped around so i had to shuffle things around on the ...
2
votes
1answer
353 views

unity - problem in limiting rotation of object?

I am trying to make a game with unity. In this game, player uses mouse to rotate a container or box around x and z (rotate to left and right and also toward the camera and opposite). I used below ...
2
votes
1answer
92 views

Where/how should A Star tie breaking occur?

I've recently written a path finding script that utilizes a basic implementation of the A Star algorithm. It works fine but is not very fast. This is due, at least in part, to the fact that it isn't ...
2
votes
1answer
198 views

Keeping an object constrained to a 2d radius based off of the camera

A few weeks back I posted a question about keeping an object on the screen. What I would like to do now is clamping an object around a 2d radius based on the camera. I'm need this for a reticule ...
2
votes
1answer
441 views

Combining several animations into a single FBX

I'm trying to figure out a workflow for preparing character animations for Unity so that they are all combined in a single FBX file. The advantage as far as I see it is that it then uses only a single ...
2
votes
2answers
127 views

preventing a camera from getting stuck inside a mesh in Unity

I've a 3rd person camera similar to Mario64. Currently, I'm working on preventing the camera from getting stuck inside a mesh. The goal is to move the camera overhead. This much trickier than I'd ...
2
votes
1answer
103 views

'Ball.rigidbody' hides inherited member 'Component.Rigidbody'

I have some understanding of c# and I am new to unity. I am currently making a 3D project which use the Rigidbody component on the ball object. When I use following code: public class Ball : ...
2
votes
1answer
72 views

Limiting x and y movement so you can't go off camera

So I want to make an on rails shooter like that of Star-Fox in the Unity engine. What I would like to do is limit the ship from moving off the screen. You move along the X and Y axis so i wont have to ...
2
votes
1answer
70 views

Keep track of VoxelData/NPC in parallel Level

Background I'm tring to make a First-Person-Shooter Game in a Voxel-World (Finit Size) with Unity3d. The Player has some kind of a Base that he has to protect against Enemy units. There are also ...
2
votes
1answer
143 views

Using XBox 360 controller in Unity game - game doesn't recognize axis movement

I have a problem with the usage of XBox controller in Unity game. I connected the controller to the PC and it works fine, I also managed to use it in the game itself - I'm using "A" button to fire and ...
2
votes
1answer
113 views

Given a 3d goal point and a turn rate in radius, find max speed to reach goal

I'm working on a 3d space sim with AI agents flying ships through space. I am trying to get them to follow a waypoint path nicely, which involves figuring out how fast they can be travelling and still ...
2
votes
2answers
38 views

Unity Physics Trouble with Platform Objects

Hi Game Development Community! I'm new to designing in unity, and I'm having some issues with my player game object traveling through platform game objects. Several of my game objects (pink in ...
2
votes
2answers
257 views

How to instantiate a sprite from a sprite sheet using script in unity?

We are creating a 2D top down rpg, and we have multiple textures, and we need to be able to change which sprite sheet its reading from in order to change the look of the walls and floor in each room. ...
2
votes
1answer
117 views

Getting the Volume of an Uneven Mesh

Let's say I have a cube, and that cube breaks apart into 100 different unevenly sized pieces. How can I get the volume of each of those pieces compared to the cube's volume? Using this in order to ...
2
votes
1answer
363 views

How to create 2D shadows and lighting?

How do I create shadows and lights in a 2D top down perspective game? I want to achieve an effect similar to this game (also made in unity) where some objects like a torch, different sprites, and the ...
2
votes
1answer
83 views

Restricting body movement withing a specific length while dragging a gameobject in unity

private void OnMouseDrag() { Vector3 screen_sp=new Vector3(Input.mousePosition.x,Input.mousePosition.y,screen_space.z); Vector3 cur_pos=Camera.main.ScreenToWorldPoint(screen_sp)+offset; ...
2
votes
1answer
59 views

What framework do you reference for external dll's to work with Unity/Mono?

So I want to compile an extensions dll for a unity game because I feel I'll end up reusing these extensions in other games/projects too - and I want to learn about external dependencies with Unity. :) ...
2
votes
2answers
217 views

How to draw a line in 3d space?

I have a top down billiard game. And on click / tap the ball moves in the clicked direction like in the image below: Now, I want a line to be drawn in the direction where the mouse is hovers or the ...
2
votes
1answer
99 views

My bullet changes the velocity depending on where I click

I want to build a little 2D-Sidescrolling shooter and I'm now at the shooting script. I already figured out how to shoot a bullet towards my mouse pointer. I got something like this : Vector3 ...
2
votes
2answers
545 views

Unity NGUI Arial Label looks different in iOS after updating Unity to 5.1.1

I am using NGUI and I have a UILabel. It uses Unity dynamic font Arial. Bold. No effects. This is how it looks in the Unity editor: And that's how I want it to look. When I build it in iOS, it ...
2
votes
1answer
689 views

Unity: UNetWeaver warning: SyncVar set from within property function. This will not set dirty flags. How to?

I was trying out the new Unity networking and I added the SyncVar attribute to one of my variables to be synced. I also have a property to get/set the variable and update the visuals when set. I set ...
2
votes
1answer
103 views

Dynamically save prefabs

We have made different types of prefabs, if we want to change small thing in all prefabs, we do drag all those prefabs to scene ,create script which will do its required work .All is fine till now ...
2
votes
1answer
1k views

Unity 5 Client RPC call: Failed to Invoke ClientRpc

I have a Unity 5 client and server running. On the server a path is generated and I want the client to receive the position of each target node on this path. Following the Client RPC calls section ...
2
votes
1answer
286 views

Generating mesh along path

I'm currently trying to generate a path along an array of points(Vector3) This is the result i'm currently getting The dark gray points are the given path The red points are the generated verticies ...
2
votes
1answer
330 views

Is it possible to load asset bundle dependencies manually in Unity 5.0?

Is it possible to tell Unity to not load asset bundle dependencies automatically so they can be loaded manually. If so, how can this be done?
2
votes
1answer
115 views

Determine if AI can traverse a given spline

I have some AI Agents that I want to navigate along a spline. The agents have a speed and a maximum turning radius. For some splines the curvature is too tight for the AI agents to navigate around and ...