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
1k views

Profiling the GPU of a tablet

We are working on a tablet game in Unity Pro (for the first time). Unity's profiler works great for probing the CPU, but the tablet's GPU isn't supported in the profiler, so we have no idea where the ...
2
votes
1answer
1k views

Rendering lightmaps at runtime

I'm creating a procedural terrain system for Unity. And I'm looking for ways to efficiently cast self-shadows on it. If it wasn't procedural, I could simply bake a lightmap using Beast. But, I can't ...
2
votes
1answer
773 views

What happens when a texture is too large for a device

The question is two fold: What happens on a device when a texture is too large for it to handle? Will it crash or simply downsize it? In Unity if I use texture atlases of size 4k and then set ...
2
votes
1answer
418 views

3D movement on an authoritiative server?

I'm developing an MMORPG, using Unity for the client and "standard" C# 4.0 for the authoritative server. The server should check each player's movement and ensure that it does not collide with props ...
2
votes
1answer
544 views

How do I get URL parameters from a Flash game (developed with Unity3D)?

I made a simple Flash game in C# using Unity3D. It interacts well with a web page: There is a textbox for the player to type their name and that name is used in-game. Now I want to pass the player's ...
2
votes
2answers
774 views

Day and Night mode according to user's real local time

How do I make it so the texture of my plane is a black sky when it's night according to player's local time (say from 10 PM to 5 AM it's going to be black, and from 6 AM to 9 AM it's going to be a ...
2
votes
1answer
172 views

Getting half plane direction relative from cam position

Im implementing certain Camera movements in my turn based games. I'm able to place and rotate the camera between two units that attack each other. However it will always move to the same "side". Which ...
2
votes
1answer
700 views

How does Application.genuine work?

In Unity, does anyone know exactly what is behind the scenes of Application.genuine? More specifically, I would like to understand its exact process so I can understand: If I can use it safely ...
2
votes
1answer
164 views

What are some strategies for handling a zoomed out grid of sprites?

I'm writing a grid-based 2D game in Unity3D that would ideally use grid sizes of around 200x200 or so, with multiple zoom levels, including all the way out. When I tried render a 200x200 grid at the ...
2
votes
1answer
151 views

Rotation independent rotation

I came up with some cube rotating, but I could not make it smooth and easy to use because as the cube turned - the keys that handle the turning changed their purpose. Link to demo. The demo rotation ...
2
votes
1answer
141 views

Mixing animations

I'm working on a swing animation and mixing it with a turn animation in a motorcycle game. The issue is that for the swing animation to work while turning only the swinging arm has to animation, ...
2
votes
1answer
624 views

Shooting Bullets Around a Sphere

I currently have a ship that can orbit around a sphere freely controlled by a joystick. There is a separate joystick that controls the gun and starts shooting when it is touched. Right now the ...
2
votes
1answer
479 views

Sound activated particlesystem

I am trying to make a particle system that is activated by sound. Like emitting on the beat resizing on the beat and such things. I found some nice tutorials on how to make things like ...
2
votes
2answers
2k views

How can I prevent clicks from going through a GUI.Box?

I have a GUI.Box that I slide in from the side of the screen. How can I prevent mouse interaction from going to any objects under it (another GUI.Button for instance, or for that matter an ...
2
votes
1answer
20k views

Unity3D draw call optimization : static batching VS manually draw mesh with MaterialPropertyBlock

I've read Unity3D draw call batching documentation. I understood it, and I want to use it (or something similar) in order to optimize my application. My situation is the following: I'm drawing ...
2
votes
1answer
2k views

Blur shader without render textures?

Is it possible to append a blur shader to a standard (diffuse) shader ? I am looking for a way to do this as Unity indie doesn't allow render textures.
2
votes
2answers
1k views

adapting a Unity gravitational script to allow moons

I'm using this script: http://wiki.unity3d.com/index.php/Simple_planetary_orbits to get a solar system going in Unity, but it doesn't seem to support creating bodies that orbit other moving bodies ...
2
votes
1answer
3k views

detect asset change while running in unity editor?

Is it possible to detect asset change while running in the unity editor. When I update my model, I see it change but the xml data associated with it does not change. So it would be nice to detect ...
2
votes
1answer
2k views

Unity3D: default parameters in C# script

Accordingly to this thread, it seems that default parameters aren't supported by C# script in Unity3D environment. Declaring an optional parameter in a C# scirpt makes Mono Ide complaint about it: ...
2
votes
3answers
1k views

Do I have too many colliders on my screen?

I'm running into a situation where my frame rate drops from 70 FPS (on my desktop computer) down to 5 FPS (on my iphone) and I'm trying to understand why. At the moment, I'm only drawing simple ...
2
votes
1answer
365 views

How can I speed up Unity3D Substance texture generation?

I'm working on an iOS/Android project in Unity3D. We're seeing some incredibly long times for generating substances between testing runs. We can run the game, but once we shut down the playback, Unity ...
2
votes
2answers
362 views

How to prioritize related game entity components?

I want to make a game where you have to run over a bunch of zombies with your car. When moving around, the zombies have a few things to take into consideration: When there's no player around they ...
2
votes
2answers
3k views

Destroying instantiated objects stored in a list not working in Unity

I have a GameObject with associated a javascript. I have defined a private variable like this: private var objects = new Array(); now in the Update method I instantiate new objects and push ...
2
votes
1answer
1k views

Why can't I expose a Plane variable in my unity script?

I've got a script which creates raycasts. I wanted to use the (presumably less expensive) Plane.Raycast rather than the GameObject.Collider.Raycast (because the gameobject one has a distance parameter ...
2
votes
2answers
4k views

Creating an object in javascript with unity (unityscript)

So I have a ton of experience with JavaScript (its what I do for a living) but I am new to unity. I have built a game engine in javascript but now want to move it over to unity. I have been trying to ...
2
votes
3answers
2k views

How to make a ball fall faster on a ramp?

So, I'm making a ball game. Where you pick up the ball, drop it on a ramp, and it flies off in to blocks. The only problem right now is it falls at a normal speed, then lightly falls off, not nearly ...
2
votes
2answers
833 views

Unity: Is there a way to edit a Skin file?

My project has multiple skins and sometimes we have to deal with skins with many custom styles. Editing them in the editor is difficult, for instance, I cannot delete one style that is not the last ...
2
votes
1answer
7k views

Collision intepenetration and objects getting stuck (Unity)

I am having what is probably a newbie problem with Unity, but for the life of me, I can't find a decent solution to it. In short: my rigid bodies collide, but sometimes, they interpenetrate and stay ...
2
votes
1answer
2k views

How can I create my mesh so that textures applied to it are NOT rotated 90 degrees in Unity 3D?

I'm trying a really simple test in Unity 3D. I want to render a texture on the simplest plane possible. So, I've created a two-triangle plane in Blender, then imported it into Unity. From there, I ...
2
votes
3answers
4k views

Unity, changing gravity game & stopping character when he hit a wall

i am currently working on a 2d puzzle game in the unity engine. One of the aspect of this game is the possibility to rotate the level of 90°. It also rotate the gravity. The main character is not ...
2
votes
1answer
3k views

in Unity3d, how to automatically create fixed joints in a wall of cubes?

I want to create a wall: width 6 cubes height 7 cubes therefore I have 22 cubes on the margins and 20 cubes inside. For each of the margins cubes(except the corners) I have to set 3 fixed joints, ...
2
votes
1answer
4k views

2d tank movement and turret solution

I'm making a simple top-down tank game on the ipad where the user controls the movement of the tank with the left "joystick" and the rotation of the turret with the right one. I've spent several hours ...
2
votes
1answer
48 views

Unity rigidbody exhibits a premature max speed

In effort to build a racing simulator, I have been working on a working model for the pistons in the engine, and have come to a bit of a stand still. I have gone through extensive testing, through ...
2
votes
1answer
253 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
60 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
389 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
160 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
49 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
92 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
142 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
52 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
100 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
86 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
35 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
320 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
215 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
15 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
67 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
195 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 ...