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
5 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 ...
1
vote
0answers
6 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
18 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
0answers
5 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: I want to be able to turn the turret with the mouse. So i added the script turnTurret ...
1
vote
0answers
23 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
10 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
31 views

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

I'm using gyroscope and I need to get highest value for user acceleration (x, y, z axises) from gyroscope My current code looks like this using UnityEngine; using System.Collections; using ...
-2
votes
0answers
15 views

Error 'ArgumentException:The thing you want to instantiate is null' when creating a game object [on hold]

I am creating a game object using C# script in the following way: using UnityEngine; using System.Collections; public class TestingPositions : MonoBehaviour { GameObject hero; Sprite ...
0
votes
1answer
62 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
0answers
33 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
33 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
25 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 ...
3
votes
1answer
33 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
29 views

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

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
21 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
20 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
11 views

Replace text in Unity [on hold]

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
25 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
22 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
24 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
22 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
48 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
20 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
20 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
43 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
18 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
7 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
23 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
19 views

Build Unity game error (since added google services) [on hold]

I added play game services for Android on Unity and after building game I recieve this error. Is there any solutions? I updated SDK Android. Error building Player: CommandInvokationFailure: Failed to ...
0
votes
0answers
20 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
1answer
32 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
35 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
19 views

How do I load a list directly to my gpu memory? [closed]

I have a 75k point list that I need to load and store in my gpu memory, how would I go about this?
0
votes
0answers
21 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. ...
-1
votes
0answers
60 views

Double jump problems [closed]

I wrote this code to do double jump but it doesn't works.I decided to do a groundcheck and a jumpcount and they are both working . When my character jumps after 2 times the jumcount becomes equal to ...
0
votes
0answers
25 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
29 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
41 views

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

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
119 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
26 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
30 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
28 views

Cross Platform development Tools [closed]

We are developing our first mobile game and have question regarding cross platform multiplayer SDKs The game is to be run on both IOS And Android and it is being developed in Untiy My question is: ...
0
votes
0answers
31 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
28 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
23 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
55 views

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

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 ...
-3
votes
0answers
90 views

RPG Item System in Unity C# [closed]

I am trying to make an offline single player RPG game and I want to add an item system to it. What I need as information about each item is: ID, name, dmg, price etc. How do I handle this ...
-1
votes
1answer
32 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
21 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
17 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 ...