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
1answer
44 views

How do I access variables using namespaces?

I've got a whole lot of scripts, none of them so far use namespaces. But as I get more and more scripts to deal with I thought it would be a wise idea to start using namespaces. I've never used them ...
0
votes
2answers
37 views

Unity 2D Following player on the x-axis only, at a constant speed

This following code does work, but I have one issue with it. Once the gameobject starts getting close to the player that it is chasing it slows down and does not continue going at a constant speed to ...
0
votes
0answers
21 views

Sounds in Unity game play to opposite speaker

I'm using Unity Game Engine. I have an AudioListener attached to my camera gameobject. Even though my earphones are in correctly, sounds that should be playing to my left ear play to my right, and ...
1
vote
1answer
29 views

Handle shared vertices in mesh deformation

I have a cube-sphere made from 6 planes. I am deforming each of the plane vertices using this code (C#): aPlane.transform.aPoint(vertices[i]).normalized * this.radius + (randomFloat)); This gives ...
0
votes
0answers
35 views

Using animation in Unity?

How can I simply implement this animation in Unity: codepen.io/epilande/pen/ZYMqNX I am ready to buy the PowerUI asset, if I have to.
0
votes
0answers
13 views

Distance fog smooth out plane's fade with respect to ground

I am looking for distance fog for my endless racing game. Unity's default fog system is too heavy for mobiles so for workaround I am trying to add large plane with transparncy..the problem occures ...
0
votes
0answers
19 views

Multiplayer Spawn not working

The error message I get is SpawnObject for Player(Clone) (UnityEngine.GameObject), NetworkServer is not active. Cannot spawn objects without an active server. I know that the server is ...
0
votes
2answers
36 views

Collider not working

I have a 2D object (without a parent) with a 2d box collider (dimensions are not small) added to it and set as trigger when I place it in the scene it works just fine however when I instantiate its ...
1
vote
2answers
28 views

Rotating a Sprite and Moving It along That Angle in Unity

first time posting here. What I want to do seems extremely simple, but I'm not familiar enough with Unity to be able to implement it. Also, I wasn't able to find an answer that exactly solved my ...
4
votes
1answer
274 views

Set a 'chance to spawn' for each GameObject in an array

I have an array of gameObjects in a spawner. I want to randomly spawn these gameObjects based on a weighted chance. I want to be able to manually set in the Inspector a percentage chance that an ...
1
vote
0answers
11 views

Unity: Built-In Shader Transformation Explanation Resource

I'm working on some of my first shaders and taking a look at the variables included by cginc I see this list of transformation matrices: I've watched some beginner talks and I understand what the ...
1
vote
0answers
15 views

Unity Trail for Eyes 2D

i want to make some kind of an Eye Tail effect for this charakter: I found the Unity Trail Renderer effect but the start of the Trial is perpendicular to the dragged/moved direction: Can i make ...
0
votes
0answers
16 views

Unify visual experience across different devices' screens

How would one approach the problem when your graphic assets (images, textures and so on) look different on different devices? For example, an artist made a set of graphic assets looking at his display ...
0
votes
0answers
14 views

How can I add a material to a property drawer?

I am trying to create a property drawer with the ability to select a material, but for there to also be other components, such as a min-max slider. I have successfully created the min-max slider ...
3
votes
2answers
64 views

Stopping 3D object in place

I am at 1.2 stage (moving the player) at Unity course "Roll-a-ball" and have question: I want to add feature that stops a player and sets his new position on 0, 0, 0. I can reset the position, but I ...
0
votes
0answers
32 views

Share Image on Android Application from Unity Game

I've captured screenshot in my game when player dies. I've following code to capture screen shot. RenderTexture rt = new RenderTexture (800, 600, 24); MainCamera.targetTexture = rt; ...
2
votes
1answer
31 views

How do I include XML files in an Android build?

I have a few XML files I want to include in a build of my game, and I want to have access to those XML files in Android. How to I store and load those XML files?
0
votes
0answers
23 views

How to compress an asset bundle and decompress it on iPad or iPhone

In have a prefab size of 2.4 mb, when I convert this into Unity Asset Bundle, the Asset Bundle is goes to 127.2 mb. How can I compress this into small size? My code is: public class ExportScene : ...
1
vote
3answers
55 views

Static variable not holding its value

I am creating a real time multiplayer game in Unity 3d. When a game ends I set a static boolean value called "waitingToEndGame" to true. In Update() it waits a few seconds before moving to a new scene ...
0
votes
1answer
25 views

how to manage loads and memory usage and process in unity

i wan to know level and scene management for memory and process management is handled by unity or not or developer has to handle these kind of works. for example think you want to know develop an ...
3
votes
1answer
44 views

place sprites in grid pattern within an area

I have been trying to do this for a few hours in unity now but cant get my head around it. basically i have 4 points(vector3) 1 each for the 4 corners topleft, topright, bottomleft, bottomright. now i ...
0
votes
0answers
31 views

How can I delete multiple scenes at a time from Unity's hierarchy panel?

I started using Unity this week and having some trouble with the interface. I can't figure out how to delete multiple scenes from the Hierarchy panel. I select them all and can't right-click "remove ...
0
votes
1answer
27 views

Unity 3D Move Object with RigidBody

I have added RigidBody component as well as Mesh collider to an object moved with keyboard. I know that it the object will go through another (with RigidBody and Mesh collider too) if I use transform ...
1
vote
1answer
50 views

Draw wireframe models for Gear VR app: Unity or Eclipse?

I want to create a 3D Android app for Gear VR that does/lets me do the following: Read an input file with a bunch of coordinates of points (including information about how they should be connected) ...
1
vote
2answers
31 views

Unity get more than 2 lines of log height

Unity does only display 2 lines in height for each log, at least with the default settings. I couldn't find a menu, where I could change this. I want to display a matrix, and I need to see the log ...
0
votes
1answer
36 views

Unity C#: Change speed when all Targets are destroyed

I have a game where a Gunner moves on a pre-set path towards a final destination. You play as a Magic Bullet that auto-fires from the Gunner's current position and can be controlled with WASD. When ...
0
votes
0answers
33 views

Unity websocketsharp is closing the connection directly

I got a working code, which I want to change a bit for better readability but afterwards my web socket is just closing instantly. First off, I got this code working : using UnityEngine; using ...
0
votes
1answer
19 views

how to bring movement and rotation vectors of object in the current scene in unity editor

sometimes in unity i need to zoom to fix the exact position and rotation of an object. but movement and rotation sign of the object always stays on object and i think its pivot of the object. How ...
0
votes
0answers
39 views

Dot product not working as expected

Recently I am learning dot product, While below code works from Unity's documentation, http://docs.unity3d.com/ScriptReference/Vector3.Dot.html public Transform other; void Update() { ...
0
votes
1answer
20 views

Rotate smoothly object to angle (Y axis) of the collided object

Well, let's say I have two planes, one which I am moving, and another one that I collide with, that has a different y rotation. I want to make that, once both planes collide, the plane the user ...
3
votes
1answer
78 views

How do I get data from a WWW object without freezing my game?

I am using Unity 3d to create a real time multiplayer game. I have a database set up that keeps track of player statistics and what in app purchases they have purchased. I have written a Database ...
1
vote
1answer
63 views

Unity2D Isometric layering

I'm developing an Isometric Game but I have problem apply the right layer for make, for example, a wall behind or in front of the Player depending on the Player position. I'm able of getting works in ...
1
vote
1answer
63 views

Reducing mobile build size

This is my second time making and game and I want to make sure that I fit under 50 mbs. So far my plan is to fit all the games artwork into two 2048x2048 sprite sheets. I tested a empty unity3d ...
1
vote
1answer
35 views

Unity simple solid color alpha shader

I searched for a shader, where I can set a solid color, which I can fade in or out like I want. There is not such a thing build in as far as I could see. Now I got this code, which works fine in case ...
-1
votes
0answers
20 views

Zoom only the particular object in unity

I am working on a sample to zoom the particular object when clicked on it.I have used the following code var zoom : int =15; var defaultFov : int=60; var smoothness : int=5; var isZoomed : ...
1
vote
0answers
30 views

Unity 5.3.4: Controlling multiple audio sources at once?

Is there a way to control the max distance of a group of audio sources at once? I want to implement all my sounds, then be able to play with some of the audiosource settings of all of them..
0
votes
0answers
15 views

Unity Lens Flare disappears at edge of screen?

I'm using a Lens Flare component to represent the sun in a 2D game. When the sun rotates onto or off of the screen, I noticed that the flare effect disappears. Basically, once the center of the sprite ...
0
votes
0answers
16 views

How can I make an expandable menu and assign names to buttons randomly from an external file using Unity?

I'd like to create a menu on the lower left side of the screen which will present some options (guns) to the player. The number of options should change based on how well a player is doing. In other ...
0
votes
1answer
37 views

UNET spawn dynamically generated object unity

Spawning works when all clients are connected, but if a client connects after I spawn all my prefabs there are errors. I spawn the object before changing its Rigidbody's velocity, which seems to ...
0
votes
0answers
30 views

How can I override OnTriggerEnter?

I am trying to extend Unity's BoxCollider class. So I am extending it in the editor like such: using UnityEditor; using UnityEngine; [CustomEditor(typeof(BoxCollider))] public class MyBoxCollider : ...
0
votes
1answer
32 views

Limit Quaternion/vector3 axe in a certain interval

I have some trouble to understand, and handle Quaternion and Vector3. I'm improving the tutorial Tank of Unity: EDIT: Because a video explain so much better, there is a link to the 30 secondes video ...
1
vote
0answers
33 views

How can I change the list of enum options displayed in the inspector?

I have an array of enums: using UnityEngine; public class EnumsInInspector : MonoBehaviour { [SerializeField] public EnumType[] myEnums = new EnumType[3]; public enum EnumType { ...
0
votes
0answers
64 views

Unity to xCode - GIDSignIn.h not found

I exported my Unity game to xCode and when trying to compile I get the only error: GIDSignIn.h not found... I added the GoogleMobileAds SDK for iOS and the Google Sign In SDK for iOS (as .bundle ...
0
votes
1answer
46 views

Unity3D - How to get highest value for acceleration from Input.gyro

I'm trying to develop an app that can detect car acceleration, braking and cornering speed. I need to detect device acceleration. Is that acceleration high or low?. Like flo app on Google Play. I'm ...
0
votes
1answer
83 views

My bullet keeps going up

So I have a bullet script that fires a bullet straight in the Y direction that gets called as the bullet is instantiated. The plan is to always shoot in the same direction, straight in the Y, but to ...
0
votes
1answer
73 views

Simple 2.5D flight movement

I'm building a simple 2.5D Dogfighting game, kinda similar like this one: https://gfycat.com/PleasantDeterminedArcherfish for the moment my movement works like this: if (Input.GetKey("left")) ...
0
votes
0answers
37 views

Unity2D wall jumping not working correctly?

i've been working on this project for the past week using unity engine, its a 2d platformer similiar to super meat boy.I've been able to program jump sustain(jump higher when you press space longer), ...
1
vote
0answers
50 views

Is it possible to use true Blinn-Phong lighting on Unity Android/IOS?

I've noticed that the Unity's Legacy Shaders/Specular shader does not work on mobiles due to the lighting model being incompatible. I then tried using the Mobile/Bumped Specular shader, but this ...
2
votes
1answer
48 views

Why is my perspective layer is painted over ortho layer?

The entire game takes place in ortho with the exception of the background layer which is drawn on a perspective camera. Everything seems to be working well except that the background is displaying ...
2
votes
1answer
41 views

Unity, how do I pause the Audio in the Level? [closed]

I wanna pause the Audio if I press the Pause Button also, I need help.. Pause Script: #pragma strict var pausemenu: GameObject; public function pause() { pausemenu.SetActive(true); ...