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
0answers
19 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
17 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
42 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
37 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
43 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
111 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
55 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
84 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
78 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
39 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
86 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
51 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
47 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); ...
0
votes
1answer
52 views

PS3 controller with Unity on Mac

I am trying to use my PS3 Controller with Unity but it has been unsuccessful. I followed this video to do so: https://www.youtube.com/watch?v=LcettC1QHu4 I have done the same thing as the video but ...
0
votes
0answers
28 views

How to get vectices of a sprite in correct order in Unity?

Currently, when I examine sprite.vertices, I see that it is ordered in crossed way, like: one from bottom, one from up, another one from somewhere else... etc. I need the correct order to make array ...
0
votes
1answer
18 views

Replace text in Unity [closed]

i tried to look up my question but didn't really find an answer that works for my situation. I'm using this unity asset called Dialoguer to create interactive dialogues. What I'm trying to do is to ...
0
votes
0answers
67 views

How to design a 2D chess board in Unity?

I'm currently taking a course on Udemy about Unity, and am somewhat experienced with C# (one year high school, two years of college). I just ran across an old textbook that had a final chess game ...
1
vote
2answers
28 views

Translating a world position to an array position

Lets keep this simple, so, assuming I have an array like this ... var array = new bool[10,10,10]; .. and then I have a start and end vector3 ... var start = new Vector3(-21,-21,-21); var end = new ...
0
votes
1answer
55 views

Bounce with multiple collisions

Here's the problem: I'm writing arkanoid-like game in Unity 5.3. I'm using 3d physics and simply ignoring z-axis in computations. No gravity, 0 drag and velocity reset every bounce by script. My ball ...
1
vote
1answer
31 views

What is the maximum value of a LayerMask in Unity?

What is the maximum value of a LayerMask in Unity (the value when all layers are included)? And how can I find it using C# bitwise operations? I tried ~0 but it shows -1 in intellisense. Thanks in ...
1
vote
3answers
75 views

How can I set up Unity so that 2d images are displayed in their original resolution?

I took images from my iOS game that I am developing in SpriteKit and put them in a Unity Android 1136x640 screen, which are the same dimensions for the iOS game but the images are a lot smaller. How ...
0
votes
0answers
64 views

Unity onValueChanged Dropdown in loop

I am having a problem with dropdowns which I add them programatically, more precise with the onValueChanged event. No matter which dropdown value I change in game the parameter used by onValueChanged ...
0
votes
0answers
60 views

Save and retrieve image from database in unity

I have done a sample to insert and retrieve data from MySQL in unity.Now I need to insert and retrieve image from MYSQL in unity. The images are files selected by the user from their filesystem. Can ...
0
votes
2answers
87 views

How does billboarding 3D sprites affect performance?

I was reading the Unity manual on trees and one of the claims made is as follows: Unity uses optimisations (eg, billboarding for distant trees) to maintain good rendering performance... I was ...
0
votes
1answer
40 views

Why is my TextMesh always on top?

I have a 2-d game that I am making, using 3-d assets, including TextMeshes for text. I have decided that in some instances, I would like to have the TextMesh appear behind objects in the foreground. ...
1
vote
0answers
51 views

UnityWebRequest and/or HttpWebRequest give 403 on Android with PUT

I am trying to post an image captured through my game to Facebook through their SDK, and as it requires a URI, I wrote a simple AWS Lambda function to take a byte array and upload it to an AWS bucket. ...
0
votes
0answers
27 views

One Game Object for storing scripts?

Is it a good idea to store Singleton scripts (for example Game Managing scripts) in a single GameObject, instead of creating multiple ones for each individual script? Example:
0
votes
0answers
38 views

Unity WebGL build throws errors

I am working on a multiplayer game for WebGL platform and i am using (http://lockstep.io/ - SocketIo & node.js server ) for handling the game. I am facing these issues as shown in the attached ...
0
votes
2answers
46 views

Handling accelerate in different devices

Hi I am adding tilt controls to my game.The sensor values I get are differ in different android devices which result in random behavior... Anyone knows how can I tackle this situation? I tried ...
0
votes
1answer
53 views

Rotate a UI Image exactly 360 degrees over the course of 1 second?

I have a UI Image that I want the user to click and have it rotate 360 degrees once on the z axis. I can get it to rotate through a coroutine but I'm having trouble making it stop once it is started. ...
0
votes
0answers
53 views

Unity bloom effect doesn't work on some mobile devices

I tried to implement bloom effect (standart Unity asset) to my game but after make android build bloom stops work on some devices e.g on Samsung galaxy s3 it's fine but on Samsung galaxy s5 it's not. ...
0
votes
0answers
26 views

Rigidbody2d and square steps

Well, I am developing small game based on Rigidbody2D character. He should go horizontally, jump and automatically climb on rectangular stairs when walking on them. I know slopes is a possible ...
1
vote
1answer
39 views

Unity3d Transfer of value from one script to another

Script 1 public class enemy : MonoBehaviour { private Vector3 Player; private Vector2 PlayerDirection; public float Xdif; public float Ydif; private float speed; private ...
-2
votes
1answer
64 views

How to make a game object rotate around its Axis in Unity? [duplicate]

Ok So i making this simple platformer with a ball. So basically i have A pickup / Collectible that is a Coin. I want the coin till it gets collected by the ball to keep rotating around it axis . Also ...
4
votes
2answers
145 views

Is there a way to turn collision detection system off completely in Unity?

My world setup is 2D Top-Down. All collisions are disabled from the collision matrix. There are no collisions in the scene as I wanted, but as I perceive, Unity is still trying to calculate ...
0
votes
0answers
36 views

Billboard a quad to a position

I am trying to make a custom billboarding effect. I know that standard billboarding causes a quad to always face a camera, taking the camera position and view direction into account. I want a slightly ...
1
vote
0answers
38 views

How to have a gradient blur in objects on Unity?

This is related to a previous question I've asked here: How to blur entire scene but a specific spot in Unity? At the time I managed to solve my problem with a "hard" cutoff on the blurred and ...
0
votes
0answers
80 views

Unity stream webcam to other player (Multiplayer)

I want to make it possible, that I can draw on the stream of another player in my Unity game. The networked drawing works just fine, my problem is to stream the webcam. I've got the webcam input ...
0
votes
1answer
69 views

Unity LineRenderer custom reapeted Texture with margin

I have a LineRenderer, which has 1 dot as texture, which is repeated over the whole line. Now I want to know, if there is some way to give this dots a margin, so that I can make the gap between them ...
0
votes
2answers
29 views

Getting input from just one Axis at a time

I'm trying to make a CharacterController2D Script for a simple 2D TopDown game, but i was wondering, what would be the best way to disable 2-axis movement? just allowing one direction at a time (Maybe ...
0
votes
1answer
87 views

Comparison of two 2d top down player movement scripts in Unity [closed]

I have been following along two different tutorials on making an 2d RPG and comparing the two movement scripts that seem to do the same thing but in different ways. Which is a better way when ...
-1
votes
1answer
41 views

Making the player Jump in like a Upper - Right manner in Unity

Ok so i'm new to unity and I am trying to make this simple ball game . Now in a situation I want the ball to jump in a diagonal manner (i.e W + D ). Scrip that I have makes the ball jump only Up and ...
0
votes
0answers
31 views

LineRenderer doesn't apply material in 2D Unity5

I'm making something that draw lines with mouse on top of everything (in 2D), but the color of the line is always purple even though I assign a material to the line renderer. I could change the color ...
0
votes
1answer
25 views

InvalidOperationException when peeking from a stack within custom editor

I've got a simple state machine for handling game states which works using GameObjects that I enable/disable in order to switch the states. Since some states can be loaded additively (such as the ...
0
votes
0answers
24 views

Unity's 'Ambient' Occlusion occludes everything. How to do it better?

I'm experimenting with custom AO solutions for Unity. While looking at the source for their built-in SSAO effect, I noticed the shader is doing this: half ao = tex2D (_SSAO, i.uv[1]).r; ao = pow (ao, ...
0
votes
3answers
73 views

Gameobject not destroyed OnCollisionEnter

I have this GameObject with the tag coin I am trying to destroy when the player collides with it using this code located in a player script attached to the player public void ...
0
votes
1answer
57 views

Alternative to System.Drawing for breaking an image into separate tiles in Unity

As far as I can tell, System.Drawing namespace is not available in unity. I there an alternative library to load and manipulate or generate images on the fly? Example: Imagine you want to make a ...
0
votes
0answers
16 views

Making unity inspector accept classes that inherit from a base class

I have a base class that has a lot of classes inheriting from it, I want to make a script that you can drop one of these derived classes into. How do i do that? abstract class thingy : ...
4
votes
1answer
128 views

How can I reduce the draw calls in a split screen game?

I am working on a split screen game with one camera per player. It appears that the number of draw calls is multiplied by the number of cameras I have, which makes perfect sense. More cameras means ...