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)

4
votes
0answers
22 views

Why Can't I duck reverb on the mix bus in Unity?

i'm surprised there is so little documentation on this issue. But i'm trying to duck the audio on all the mix buses in Unity so that you can clearly hear the VO of the game. Now it works great except ...
4
votes
0answers
117 views

AI using character controller makes unwanted change to it's y position

The enemy parent object does not have any colliders except for the character controller. It starts out with y = .57 and immediately jumps to y=1.6355 because of my call to CharacterController.Move(.) ...
4
votes
0answers
111 views

Is there a way to determine Android physical screen size?

We're currently porting our games to Android, and would like to be able to release a universal build for tablets and phones. Is there a way to determine the actual screen size or DPI in order to ...
3
votes
0answers
27 views

Oculus Rift on Motion Simulator Platform

I currently develop a VR environment for an existing (physically) large motion simulator platform. The user can sit on this motion platform and gets accelerated and tilted to induce the feeling of ...
3
votes
0answers
36 views

How to await async operations / coroutines?

I'm looking for a generic / reusable way to wait for coroutines and asynchronous operations to finish in Unity 5, similiar to C#5's await keyword. The simplest way I can think of is something like ...
3
votes
0answers
91 views

Everything is set to Bounciness 0 - Why am I still bouncing?

I am creating a platformer where rather than manipulating the character to get them from the beginning of the level to the end, you manipulate the world. Thus, when you want to make the character ...
3
votes
0answers
16 views

How to activate GearVR Menu in my own Unity-Apps?

So in normal GearVr-Apps, which you can download from the marketplace, you can activate the GearVr Menu to control brightness etc. with a long click on the back button. But this does not work for all ...
3
votes
0answers
51 views

getting an error while building the Game in an Android Phone

I placed an Admob Plugin in my game. Then I import gamedonia SDK for facebook connection and Push notification. in editor its working fine. While compailing it in an Android Phone it generate an ...
3
votes
0answers
59 views

How to do an anti sway bar for a car in Unity 5?

I have researched some examples of anti roll bars for Unity but they are all for unity 4 and bellow so they do not work in unity 5. Can someone please assist me in making an anti roll bar script in C# ...
3
votes
0answers
72 views

Filling Closed Shapes

Game Engine : Unity 5.1 Developing on Windows 7 Hello, I am using Vectrosity to draw some some shapes on screen run time. I also need to fill these shapes and none of them are really trivial shapes. ...
3
votes
0answers
64 views

Unity 5: Use Network Simulator, should I?

I am looking to test intelligent prioritisation of a client server game. In my scenario, two clients are connected to the server. I want one client to have a good connection to the server while the ...
3
votes
0answers
30 views

How can non-CG shader code in Unity be included?

In Unity shaders, #include, #define, and other preprocessor commands seem to not be able to be used outside the CGPROGRAM section of the shader. Since these are required for compiling multiple shader ...
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
0answers
147 views

Unity - reconstruct position from depth

I am using Unity and I want to reconstruct position from depth and frustum corners in pixel shader. I am doing this: In my App, I calculate view-space corners of the far frustum plane and pass them ...
3
votes
0answers
231 views

Input.GetAxis(“Horizontal”) not updating

I'm having trouble with Unity's basic character controlling. After i implemented the crouching in the code below the Input.GetAxis("Horizontal") does not update (while the left control is pressed ...
3
votes
0answers
81 views

Unity 5 - custom lighting model

I have tried to use my own lighting model in surface shader in Unity. But there is a problem. If I init my own lighting via #pragma surface surf _SimpleSpecular Lighting_SimpleSpecular method is ...
3
votes
0answers
168 views

smoothly recenter view over time

I'm currently using the Google Cardboard SDK for Unity to build a fighter pilot simulator. What I'm currently trying to do is recenter the view(CardboardHead) smoothly over time when the user looks ...
3
votes
0answers
1k views

How to create water with ripples in custom places for top down game in Unity?

I want to make topdown row boat game with Unity. I want graphics to be simple (sprited), but the water must be "very nice" and realistic and it should reflect movement in it (paddles and boat movement ...
2
votes
0answers
147 views
+100

Drawing visibility polygons in Unity (for vision cones with occlusion)

I'm currently trying to create an effect like the one displayed below in Unity: However, it seems that I can't do this with any of Unity's built-in light objects, and I simply cannot find anything ...
2
votes
0answers
112 views

Tower Defence stat storing system

I'm trying to find a smart way to store and retrieve stats for a tower defence game, but am currently unsure as to which approach would be best. Description: The stats system should quite basic, ...
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
0answers
127 views

Building an Octree for terrain generation

I've previously implemented marching cubes/tetrahedra to render an IsoSurface. It worked (YouTube), but the performance was dire as I never got around to implementing LoD (or even removing distant ...
2
votes
0answers
71 views

Unity: Create a custom editor for Vector2

I'm starting to dig into Unity's editor customization. What I'm looking for is a way to create custom line (or a point at least) which I could move around in SceneView and set a Vector2 value that ...
2
votes
0answers
78 views

Why are parts of this Unity scrollrect not being bound to the mask?

I'm setting up a system for people to load up extra levels. Since I don't know how many levels are going to be loaded I have a UI prefab that gets added to the main Level Load UI. However, the Text ...
2
votes
0answers
138 views

unity lag while moving a sprite

I'm trying to build a 2D game for android and after I finished developing the game I noticed that there was lag present when moving objects around. I tested it on a phone much more powerful than my ...
2
votes
0answers
222 views

Unity Profiler - What would cause PlayerEndOfFrame to have 10-16MB in GC Alloc?

I can't find much documentation on what "PlayerEndOfFrame" does. Sure it is the end of a frame but what would cause the GC Alloc to go so high? This is the profiler results from a debug build on a ...
2
votes
0answers
69 views

using IK functions in MecAnim

The documentation on how to use IK functions clearly states that an Animator Controller with at least one animation for the character is required and then Layers pane, IK pass, etc... However, I ...
2
votes
0answers
92 views

Changing AnimationOverrideController “sometimes” fails - Unity 5.2.1

I have the following code, in a menu where you can chose the armor and weapon of a character: private List<string> armors = new List<string> { "armor1", "armor2", "armor2" }; private ...
2
votes
0answers
49 views

Improving Position Sync Bandwidth Usage in a Multiplayer Game

This is the class i use to sync position between clients in a multiplayer top-down 2D shooter game: [System.Serializable] public class MovementUpdateClass { public int MessageTime ...
2
votes
0answers
221 views

How To Create A Dynamic 2D Rope In Unity?

I'm trying to create a 2D rope in Unity that is fixed at one end and other is moving up and down to pick up objects just like a crane. I've tried adding a cube and making more instances of it, ...
2
votes
0answers
101 views

Ways to get around the limiting default terrain shaders in Unity

I am trying to use the Toon Rim Light shader for Unity however there are a few problems when trying to use any custom shaders for a terrain in Unity. The most well known is of course, that all ...
2
votes
0answers
53 views

Proper setup for Mecanim standing jump animation

I have a character standing jump animation with that the character at start prepares for the jump (flexing downwards) and then jumps up in the air and i'm wondering how to get it working properly with ...
2
votes
0answers
48 views

Restore IAP in Android using Prime 31

can someone please guide me how to restore purchases in android using prime 31. What my basic understating is to get the list skus which player has purchased after he logs in with his account and ...
2
votes
0answers
156 views

In Unity, how do I make a 3D flight arc preview?

I'm stuck on how to make a preview trajectory for a projectile appear when holding a button. The trajectory should start at a certain position on the scene and end wherever the player points their ...
2
votes
0answers
42 views

How would I add a sound variable to my code?

I am writing some code in JavaScript for a ray cast shooting program. I have all the variables I need except for sound, and I'm not too sure on how to add that variable into my code. I would really ...
2
votes
0answers
89 views

Rotate perspective camera to align screen width to procedural object's width (Unity, C#)

I give up. After much trying and searching, I have to say I was unable to achieve the following task, for which I must call for your wise advice. In my current Unity 5 application (using C#), there ...
2
votes
0answers
191 views

Creating Scenes Programmatically From A Deployed Build in Unity

This is somewhat of an extension to this question: http://answers.unity3d.com/questions/513801/programatically-creating-entire-unity-games.html I have a client who would like to create an entire game ...
2
votes
0answers
194 views

How do I get the depth data of objects closer than 800mm?

I'm trying to scan the layout of blocks on a table. My Kinect can be at most 1m away from the surface and I need to stack those blocks higher than 20 cm. I'm using Zigfu. Using the kinect 1 I have to ...
2
votes
0answers
433 views

Find References In Scene of scriptable object unity asset shows incorrect results

I'm trying to work out why my game is loading a large sprite atlas that I don't think it should be. The snapshot view of the profiler shows that the atlas is loaded. The references pane shows that ...
2
votes
0answers
527 views

How do I check user's unlocked achievement and leaderboard scores via GPG plugin

I need to load user's achievement and their scores from leaderboard in my game. But the Social.LoadScore() and Social.LoadAchievements() both returns a 0 size array in callback. When I checked the ...
2
votes
0answers
1k views

In Unity on Android, how can I rotate an object with the accelerometer?

I'm making a game where you control a platform with balls falling on it, and you have to balance the balls and prevent them from falling off. I'm currently using a mouse to control it with this code: ...
2
votes
0answers
589 views

How can I combine my scrolling effect with the vertex lit shader?

I want my shader to work in both Forward and VertexLit rendering modes. I'd written a texture scrolling shader, but I also want to consider lighting which is produced by Vertex lit shader. I can't add ...
2
votes
0answers
554 views

Access Android Camera.Parameters from Unity

I would like to access the android defined class Camera.Parameters.getHorizontalViewAngle() from a Unity3D c# script but my java skills are limited. Can anybody offer any help? I have this code: ...
2
votes
0answers
438 views

Call Unity3D coroutines from a scripting language

I created a simple scripting language to use on a Unity3D game. My parser generates an AST with nodes for every type of operation, and to run the script all I need to do is call Execute() on the root ...
2
votes
0answers
634 views

5.1 sound in Unity3d 3.5

I'm trying to implement 5.1 surround sound in my game. I've set Unity's AudioManager to a default of 5.1 surround and loaded in a 6 channel audio clip that should play a sound in each of the different ...
1
vote
0answers
17 views

Unity WebGL responsive

I am trying to embed Unity WebGL to a web page. I wonder, is it possible to make this responsive, so it will always fit whatever the screen size? How to do that? Thank you for answering.
1
vote
0answers
23 views

Unity Shader blending colors and color values above 1

I have source images where each pixel is one of exactly 4 colors: red = (1,0,0) green = (0,1,0) blue = (0,0,1) black = (0,0,0) I'm trying to modify Unity's default sprite shader to use those ...
1
vote
0answers
27 views

Constant orbit using Rigidbody in Unity

I'm trying to make a few game objects (moons) orbit a planet in unity. Basically just picture a planet in the center of the screen, and a few small moons that orbit the planet with a constant ...
1
vote
0answers
13 views

Why scale of my new UI texture differs so much comparing to other GUI elements?

I have created an UI Texture and set Texture to my .png file. The size was only 256x256 but in the canvas it appears huge. I can change it to minimum 2x2 which is still big. If I compare it to other ...
1
vote
0answers
78 views

Design pattern for RTS game. Is this good or bad?

I've been plugging away at an RTS framework for a few weeks now and I've decided to try out a basic MVC design pattern for Unity based on This Article Anyway I guess I'm just looking for opinions ...