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 (2)

-1
votes
1answer
61 views

shooting the projectile in the way it is facing [duplicate]

I got my projectile facing the right way thanks to @S. Tarık Çetin. But now I want it to move the direction it's facing. I think I need to use RayCastHit2D but I am not sure. If I need to use ...
0
votes
0answers
6 views

Facebook API version detection [migrated]

We recently received this alert from Facebook on our Unity App. Your app has been making recent API calls to Graph API v2.0, which will reach the end of the 2-year deprecation window on Monday, ...
1
vote
2answers
53 views

Unity - Check if sprite is within range around player

I need to know if a sprite is within range (circle or square doesn't matter) around the player. If the sprite is, let's say, 100 blocks away from the player, I will disable it. This wouldn't be too ...
1
vote
2answers
136 views

Do I need a server to connect two players in a mobile game?

I would like to make a 2 players app game, where 2 players can compete with each other in real time. If I want the player to be able to compete with the public (anyone who registered with my game ...
1
vote
0answers
38 views

How to color individual parts of curve in unity, real time?

So I have a mesh curve that I've imported from Blender. What I want to do is to place individual points on the curve (at fixed distance) and then based on a specific number, color them. Let's say for ...
0
votes
2answers
48 views

Why does Unity allow me to use GameObjects created from non-existent prefabs?

I have code similar to the following in a Unity project. I was trying to shoot a projectile when spacebar was hit, but a projectile wasn't appearing. I found out the problem was caused because I moved ...
4
votes
1answer
167 views

Unity's Animator.GetBehaviour<T> always returning null

I have the following line: As you can see "transitionOutAnimator" is null before the line runs. transitionOutAnimator is a StateMachineBehaviour of type ThoughtBubbleTransitionOutAnimator. We can ...
0
votes
1answer
53 views

canvas screen space camera rotation issue

I have a canvas on a camera set to it's screen space (not as a child of the camera) I have my camera rotate on the y and x axises but whenever I move it on the x axis (up and down) the canvas doesn't ...
0
votes
2answers
73 views

Projectile Direction Unity

I want to shoot a projectile in the direction the gun is facing. With my current script it only shoots vertically. (I can also make it go horizontally but that's it). This is my GunController class: ...
1
vote
3answers
65 views

BoxCollider2D Not Working

So I'm making a copy of noobtuts tutorial on Snake - http://noobtuts.com/unity/2d-snake-game I've done all their steps and am at the point of extending the game solo, however I've an issue with the ...
1
vote
1answer
30 views

IgnoreCollision while Dodging & Colliding

I'm working on a mechanic to allow the player to dodge through enemies. However I'm running into the issue where the player is only able to dodge through enemies while their already dodging when they ...
0
votes
0answers
20 views

Xcode-Unity Frameworks Error

I am new to programming and I'm trying to run the game on my device. After exporting it from unity,adding the required framworks and bundles,I am getting this errors in xcode. I have found a few ...
0
votes
0answers
26 views

Unity Networking clientRPC not working

I have a networking game in Unity Version 5.4.0b24, but when i call a [ClientRpc] function from server it doesnt work, gives an error like this: Found no behaviour for incoming [ClientRpc:...
1
vote
0answers
49 views

Google Play Services somehow authenticates without internet connection

This question is asked in the context of the Google Play Services plugin for Unity. Following the documentation for the Google Play Services plugin for Unity, I called the Social.localuser....
0
votes
0answers
38 views

Unity / How do I change the color of the “Screen” based on the Object's depth's (as a Screen Effect)?

Yesterday I asked and solved my problem: Unity / How do I change the color of an object based on its depth? Today I tried to change the script(from yesterday) and apply it to the camera and it did ...
1
vote
2answers
105 views

How to make switch work with enum? C# Unity

I'm working on a script to fade UI elements in Unity, similar to a selector, where you can select the type of fading, and duration, and image to fade I found that enum is the best option to achieve ...
1
vote
1answer
61 views

Gun Rotation Unity

https://www.youtube.com/watch?v=m-J5sCRipA0 - this tutorial by brackeys shows how rotate your 2d gun using your mouse. How can I edit this script to add an auto rotating system. Where the gun keeps ...
0
votes
0answers
20 views

Unity fragment shader. Problem with passing parameters to shader in android version

I have a shader linked to a material which is connected to an object. On runtime I'm trying to change it's parameters( with uniform variables or with properties). On my PC version everything works ...
0
votes
1answer
94 views

Unity / How do I change the color of an object based on its depth?

The objective here is to change the color of the nearest object. (the nearer the object, the more "colorful" the object gets rendered; and the farther away, the more "grey" the object gets rendered), ...
-1
votes
0answers
20 views

How can I change this script to follow object [duplicate]

I have that script to follow object by camera public Transform target; // Update is called once per frame void Update () { transform.position = new Vector3(target.position.x, ...
0
votes
1answer
101 views

Obscure primitive data types against cheating [closed]

im trying to create lightweight value obscurer, against possibility to blatantly change primitive values in memory editor. Such as cheat engine. Here's what i have to far. /// <summary> /// ...
0
votes
3answers
81 views

How to find an object which is added to a scene only when game starts?

I'm looking for some advice how to find an object which is added to scene only when the game starts? Before start it isn't in Scene hierarchy. It's prefab.
0
votes
1answer
59 views

Unity - Exporting and Importing Terrains

To provide modding support via Unity editor, I need to export terrains in editor and load the exported terrain in runtime. Is this possible by any manner?
1
vote
0answers
21 views

Can I make global illumination from directional lights only affect their assigned layers?

I have a large space station scene, where there are giant mirrors that are sources of reflected light, and to emulate this, I made directional lights attached to the mirrors with cookies to make them ...
0
votes
1answer
35 views

Unity: Mouse control only works when I first click outside of the game window

I am new to unity and am programming my first person view. I have a camera attached and a character controller and I have the following script to run the character controller using UnityEngine; using ...
0
votes
2answers
43 views

Sprite with shadows in both sides

I have a gameobject with a SpriteRenderer, and I want it to cast (and receive) shadows like a 3D model. The sprite will turn around depending of his direction, so all faces must cast shadows. I ...
0
votes
1answer
19 views

Animator consecutive set parameter problem

I'm having a little problem with my animations transitions. I have this diagram: http://imgur.com/Se8Ix1L My transitions is made by updating the parameter "stateparam". My code, changing the ...
0
votes
1answer
28 views

Unity 3d - Touchscript Asset: Get object when “touched”

I have a question regarding the exact method for getting the game object that I'm touching. I thought it would be getting the name of the PressGesture once the touch starts...but it returns me a Swipe ...
0
votes
1answer
51 views

Synchronize objects' movements moved by coroutine function

I'm using Unity version 5.3.5. I'm having problems to synchronize the movement of three different objects from point A to point B and vice versa. To move the objects I use the following code: public ...
0
votes
1answer
42 views

how to get current zoom level from scene window

I want to show some label on some rect transforms using Handles.Label(). it shows the text with a default font size regardless of the zoom level in the scene window. public class NodeWrapper : ...
0
votes
1answer
29 views

How to access triangulates in a 3d model that was imported in Unity?

I have a 3d model of a city. It is in collada format and ina dae file. I imported 3d model to unity but I don't know how can I access the objects of this 3d model with c# script.Because I am new with ...
0
votes
2answers
46 views

Constructor in derived class from MonoBehavior [closed]

So i've got a Part abstract class which inherit from Monobehavior public abstract class Part:MonoBehaviour​ And then I've a class frame which inherit from Part class public class Frame: Part { ...
4
votes
1answer
152 views

How do I apply domain warping to my marching cubes voxel terrain in Unity?

So, in GPU Gems 3 there is a cool warped terrain that i seek to replicate. Currently, I'm generating the terrain fine, but I want to add that warp effect. // Do this before using 'ws' to sample the ...
0
votes
3answers
82 views

How to do camera follow without drag and drop in Inspector in Unity?

How to do camera following an object with special tag without drag and drop into Inspector? I have 2 prefab model they are not into hierarchy for the moment when player start play. To load selected ...
1
vote
1answer
40 views

Gradient Banding in Unity Android

In an Android game, I have a gradient background that changes color over time. This was achieved by creating a 1x2 pixel texture in code, and stretching it over a large quad with bilinear filtering. ...
0
votes
1answer
43 views

(Unity) Player movement script keeps moving

My player in unity moves but doesn't stop when i let go of the key heres the code: using UnityEngine; using System.Collections; public class Player : MonoBehaviour { Vector3 movement = new ...
0
votes
2answers
46 views

Particle System Hangs the Game

I create a Smoke Effect in my Game Scene using Particle system. it works Perfectly in unity Editor, but when I run Game in Android Device it hangs. I search about that but not getting any right ...
1
vote
0answers
44 views

Moving along the surface of a mesh?

I'm trying to replicate the movement in this game: https://www.youtube.com/watch?v=OcvD8BXars8 The players ship along with all other game elements move along the surface of a mesh. I've tried ...
0
votes
1answer
36 views

Unity Wwise. No audio in my game build

I'm building a game in Unity using Wwise as the audio engine. I'm on a Mac and whenever I build the game, there is no audio. Apparently this is because the sound banks are not in the correct folder. ...
0
votes
0answers
15 views

Unity VR: Possible to render a multiple mesh/material model transparent without seeing innards?

I would like to render a model in VR using Unity. This model consists of multiple meshes, some with different materials. I would like this entire model to fade in and out without having depth sorting ...
3
votes
0answers
44 views

How do I find the face of an object?

I'm working on a build mode but the thing of it is the player is able to deform meshes. Part of my build system includes having "snap" points thus I need to be able to find the face and recenter the ...
1
vote
0answers
15 views

Unity Google VR SDK Main Camera showing Game Objects Behind Left and Right Cameras

I'm trying to get a basic VR app up and running on iOS with the Unity Google VR SDK and I've run into a strange issue where my game objects are appearing behind the left and right camera views in ...
1
vote
1answer
41 views

UDP server in unity not working

I know there are a lot of UDP examples out there, but I really need to know specifically what I am doing wrong. I have Wireshark monitoring my data traffic and according to that program Unity is not ...
-3
votes
1answer
40 views

How to assign GUIText from heirarchy into prefab object?

I want to assign GUIText from heirarchy into prefab using that C# code: private Text HighScoreText; void Start(){ HighScoreText = GameObject.Find("HighScore").GetComponent(); } But ...
1
vote
2answers
46 views

Reset Polygon Collider Runtime (Unity)

I've created an animation by using different frames. Then applied polygon collider on that object. Problem is that when frame changes in animation, it does not reset collider. I've searched for ...
0
votes
1answer
58 views

Unity saving and loading of images in game

So I'm planning out this game for unity but I don't know how feasible it will be with all of the image loading and saving. I've worked with some other coding, and while I am in the process of ...
1
vote
0answers
32 views

UDP client code throwing a very nonspecific exception

so I'm writing a UDP server and client on a couple of the machines in my virtual reality environment to allow (in this case) data from the location in the environment to trigger some air nozzles. The ...
13
votes
3answers
960 views

How can I create light shafts like Journey's in Unity?

I'd like to create cartoon looking sun / light shafts that look very close (or identical) to the ones in very well known and loved games like Journey: and Ori: How can I accomplish this?
0
votes
1answer
150 views

How do I create the terrain mentioned in GPU Gems 3

So, i want to create this style of terrain: http://http.developer.nvidia.com/GPUGems3/gpugems3_ch01.html However, as much as I scour the web trying to find ways to implement this inside Unity, I can'...
1
vote
3answers
723 views

Do editor errors affect device performance?

Do errors that come up in the Unity editor affect a game's performance on a device (on Android in particular)? I'm talking about errors that keep coming continuously during Update() such as ...