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
55 views

How to search for a visible player?

I've an enemy static tank with a "rotable" cannon turret. I would like to rotate it in the player's direction . How to implement it ? I've thought something like void Update { SearchForPlayer(); ...
0
votes
2answers
62 views

Blinking object

I'm trying to make an element (3D object or UI element) blink in such way: There is a timer which counts down 10.0f seconds to 0.0f. In 10.0f to 9.9f range the object should fade out from opacity 1 ...
0
votes
2answers
39 views

Authoritative Server for single player but with leaderboard [closed]

I made a Fps single player, timed survival with a leaderboard ( a bit like devil daggers and others). I know would like to create a server that will prevent cheats such as avoiding collision or ...
1
vote
1answer
96 views

Tile base Farm Simulation in Unity

I am thinking of creating a sprite base 2d top down farm simulation game. The game uses tiles and I was wondering (conceptually) what is the best way to handle the farm tiles. Each tiles should have ...
0
votes
1answer
33 views

How to refer to a object that has just been hit by a ray cast?

I would like to use RigidbodyConstraints.FreezeRotation;in order to freeze the rotation of an object that is picked up. The problem is I don't know how to refer (or call) the currently selected ...
0
votes
1answer
38 views

Having trouble setting a game object as a child of another. What is wrong here?

So I'm trying to raycast on mouse click if it hits any thing make that object a child of the sender (in this case the parent). Below is my code... public class PhysGun : MonoBehaviour { private ...
0
votes
0answers
18 views

Rotating a button in Unity UI by -180 on the Y and it stops working

The title says it all. if I rotate my button by -180 on the Y axis i cant even click on it. If for example I rotate it 180 on the Z axis everything is fine. Why does this happen and how can I fix it ? ...
0
votes
1answer
28 views

More efficient using invokerepeating or update?

Im fairly new to unity development and I am working on repeating an enemy. I currently have the functionality working correctly in which I use invokerepeating to spam an enemy. Now, I have an if ...
3
votes
1answer
61 views

Upgrading Unity from 5.1 to 5.3.4 has broken game, specifically models made in Blender

I recently decided to upgrade Unity after putting it off for some time as I have a rather sizable project started in 5.1. I knew there would be some hurdles, however, I have had very little luck in ...
2
votes
2answers
116 views

Room generation with external walls and doors

I am looking to implement a means to generate rooms with outer walls with windows and doors from prefab game objects in Unity. The idea is that a group of tiles is defined as a room which I then ...
0
votes
0answers
28 views

Animation is slow on iOS Device and fast in Unity editor?

I had made a Settings popup in the game and animated it like scale animation (from 0 to 1) values. It is appearing very smooth and works good in the unity Editor, but after building to the device it ...
0
votes
1answer
25 views

NGUI sprites become blurry on android

I have this screen in the editor made with NGUI and 8 sprites: But when I build it for android and open the game the same sprites on the screen looks blurry I don't know what could be causing ...
0
votes
1answer
27 views

using Mathf.Clamp in Vector3 to restrict object drag

I'm making a checkers game and I've got a movement controller working to move the pieces. I want to restrict the drag to be within the board. The center of the board is 0,0 so the far left side's x ...
0
votes
1answer
37 views

Basic billiards game: Can't detect collision between cuestick and cueball

I have a basic Unity project on GitHub. Basically, I have a Cuestick that aims and shoots using the mouse. You can rotate around the cueball with your mouse and when you're ready to shoot, you can ...
-1
votes
1answer
52 views

How to enable/disble vibration feedback in Unity?

I want to create toggle that enable/disable vibration feedback on the device, as i can't figure it out. How do i do that? public void ToggleVibration() { //enable and disable vibration ...
3
votes
0answers
125 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 ...
0
votes
0answers
31 views

Using blend trees for a simple 2d character

Let me start by saying that I'm not a animator and basically have no idea what I'm talking about. The character in the game has 3 states : indle(looks at camera) walk left and walk right. I've set up ...
0
votes
1answer
49 views

Animator.Play() only works the first time

I am creating a game in Unity 3d that is using an animation to move an object. For some reason the animation only works the first time it is accessed and from then on it acts as if it is not being ...
0
votes
0answers
29 views

RawImage won't display behind the other elements on my canvas?

New to Unity / Game Dev, though not new to programming. using Version 5.3.4f1 I've created a Canvas object, which contains the Title / Start / Exit text objects. If I add a RawImage to the Canvas, ...
3
votes
4answers
120 views

How to get the closest “visible” object from my “player”?

I'm using Unity 3d and i have to accomplish the following task: get the closest "visible" object to my player in forward direction. It is a sort of radar. I don't know where to start. Any advice ...
3
votes
1answer
193 views

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 ...
0
votes
1answer
23 views

ScriptableObject not working after build in Unity?

I have a GameObject with a ScriptableObject on it, stats. It works fine in editor but when I try to build I get a message, A script behaviour (script unknown or not yet loaded) has a different ...
0
votes
3answers
80 views

Make object follow another object while keeping the same distance from it

I want an object to follow another object just like the way it follows it when it's parented to it, but smoothly and only in the x and z axis. Here's my code so far: distanceX = player.position.x - ...
1
vote
2answers
35 views

How to make a Sprite be displayed always behind everything else?

What I am in need to achieve is to have a Sprite always facing the camera identically to what happens with any simple game UI object, but instead of always displayed above everything else, it should ...
-2
votes
1answer
15 views

Unity3D: Entering a trigger disables a few bools for no reason

I'm trying to make it so when an object enters a collider with the tag "Down" a single boolean turns false, but the problem is that more than one booleans(canGoUp, canGoLeft, canGoRight) are turning ...
0
votes
2answers
42 views

Quaternion not giving correct value back. What am I doing wrong here?

Right so I made a quaternion and assigned it a value but it reports back the wrong value. Here is the relevant code... Quaternion LeftTurnLimit = Quaternion.identity; float test = 0.1f; ...
0
votes
0answers
9 views

Unity accesing external audio

I'm developing an application on unity which gets the audio being played on external programs such as itunes or even dj software. It uses the audio or songs in this case and runs it through unity's ...
0
votes
0answers
25 views

Whe are my sprites invisible in the animation preview?

I'm just starting in Unity and now this problem came I out: As you can see, there is no sprite in the animation preview. Why is this happening?
2
votes
1answer
73 views

How to send an interface message?

I come from Unreal, still using it. There, how it works is like this: Let's say you as a player have a laser gun or something, and when shooting, you use raycast to see if you've shot anything, and ...
0
votes
0answers
13 views

Occlusion Culling Open-World Implementation (Using Unity)

I was curious how people generally do occlusion culling. What techniques are most widely accepted for performance and also where can I learn more about these? The material I can find online seems ...
0
votes
0answers
29 views

Problems with voxel physics

So I have a problem that is divided into performance and how to solve it in voxel physical, obs: I'm using Cubiquity. What am I doing: I test all the blocks. When a different block and air is greater ...
1
vote
0answers
30 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 ...
0
votes
1answer
37 views

Unity NavMesh Step Issue

I have a scene in my game that takes place in a subway. I created a NavMesh so I can easily have the enemies chase the player. There seems to be a problem though as them enemies sometimes have a ...
0
votes
2answers
53 views

Why can I not change a Sprite directly? [closed]

I am changing the Sprites on an array of Images. I could think of two ways to go about it. The first way being: var images = GetComponentsInChildren<Image>(); foreach(var image in images) { ...
1
vote
1answer
43 views

How to increase the difficulty setting as close as possible to maximum difficulty automatically?

I have a simple 2D version of Mini-golf. The goal is to manage to clear each level in the least amount of shots, the ball is bouncing at most 3 times (stops on the 4th hit) from a wall but not ...
0
votes
2answers
49 views

Collider Effeciency Question

I'm creating a game where hundreds of rockets with colliders attached are shooting at a player. Should I write my script where: 1: The player script reads the collision from hundreds of rocket ...
3
votes
0answers
26 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 ...
1
vote
2answers
42 views

Apply two animation on one object in unity

I am looking for a perfect example to apply two animation on same object and to run those animations simultaneously. In my game, a player is jumping as well as flapping. As per my research, I have got ...
3
votes
1answer
48 views

Reflection areas on texture

I have a wheel model. It's use Reflected Diffuse shader and only one texture and only one material. So it should seen like that, right? But it's seen like that: I'm really curious about that. What ...
0
votes
0answers
80 views

Unity UI Drag and Drop with conditionals

I have a nice UI drag and drop system (big thanks to quill18 and BoredMormon for their tutorials) and want to get some conditionals in it. I have 4 numbers (that are instantiated on the canvas) that I ...
4
votes
1answer
59 views

How can I get Unity to tell me the battery status of my OS X laptop?

How do I get battery status on an OS X laptop in Unity? This is un-Googlable: I keep finding either mobile stuff (iOS or Android) or people complaining about laptop battery life.
3
votes
0answers
83 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 ...
0
votes
2answers
71 views

Prevent player from jumping on a mesh

I am working on a game and I have a mesh that I use to block hallways and prevent the player from going that direction. They are placed vertically with slight angles. I'm having a problem that the ...
0
votes
0answers
16 views

unity null error excetion on array after I referenced it in another script

I am trying to make a array of bools to determine if someone has bought a skin. Using the same setup as for determining if user has bought other objects, but this stopped working and is giving null ...
0
votes
0answers
39 views

Unexpected Execution Order in Unity (uNet)

I made a little game in Unity. It works fine in the Editor. But if I run the build version I get a NullReferenceException. This problem does only appear if the build-version-client hosts the game. ...
-1
votes
2answers
100 views

Most Efficient Way to Store player stats/data in Unity C#?

I am looking at storing player data in Unity from a script that I'm writing in C# and I would like to get an opinion on the best way to store the player's stats/data about the player like hours ...
1
vote
1answer
29 views

Mesh/Path reduction to simulate traveled path to target

I generate that kind of mesh during runtime to display the path to follow to a target (think at something like the path your GPS shows you when you are travelling): I need to reduce the displayed ...
0
votes
1answer
38 views

the tree couldn't be instanced because the prefab contains no valid mesh renderer

I am beginner in unity and i imported a package tree from website and when i add a tree from the package then it show me that the tree couldn't be instanced because the prefab contains no valid mesh ...
0
votes
0answers
48 views

Turning a 2D characeter to face left or right.

This question might get flagged to be opinion based but I really need help with what decision to make. So far i know of the following ways to turn a 2D character to face the other directions (in my ...
0
votes
1answer
23 views

Invisible mesh. Are my normals, normal?

I'm creating this mesh during runtime in Unity3D. The mesh shape is ok, but as you can see on this screenshot, the mesh is not correctly rendered: it's only rendered when the camera is looking back ...