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)

2
votes
1answer
386 views

Pathfinding and clusters

For an assignment, I am required to implement an A* algorithm in order to find the shortest path between two object using different heuristics null, this effectively becomes Dijkstra Euclidean ...
0
votes
0answers
28 views

Animation with pivot-modification in Mecanim

Assume I have two animation cycles: Walking Crouching Both assume that the model's pivot is on the same level as the model's feet. Now I also have two animated transitions: Get on all fours ...
12
votes
3answers
3k views

Unit Testing at Unity3D [closed]

How to implement Unit Test at Unity3D. I wonder if it would be possible to extend the Unity editor to have some sort of testing framework in it. Is there any guideline to implement it? EDIT : ...
6
votes
2answers
710 views

Making holes in 3D objects (Unity)

How can I make a hole in an object with Unity 3D? I've something like this object and I want to make a hole in it.
1
vote
2answers
79 views

OnMouseClick not detected

I created "main script" and in Start() created simple cube: GameObject cube = GameObject.CreatePrimitive(PrimitiveType.Cube); cube.transform.localScale = new Vector3 (1,2,1); cube.GetComponent<...
3
votes
1answer
338 views

Resuming a previous scene from a current scene using the Unity3D

I am building a first person shooter game using unity and I am facing the problem of resuming a scene from its current state. It would be easy to pause the scene by using the Time.timeScale = 0.0; ...
0
votes
1answer
101 views

Enable and disable different component on a Gameobject

So far I am not clear how do you actually access the various components on a game object, to enable and disable them. I have a component that has various scripts and elements, like a camera, ...
0
votes
0answers
41 views

Use Same Animation To All Object Having Diffrent Position

I am new in unity. create one animation to the object and create 10 duplicates of same object. I want to apply Same animation to the all objects without starting animation at the same time and without ...
0
votes
0answers
64 views

Start another animation on animated object after collision

I am developing a simple 2D game in Unity. I want to start another animation on already animated coin object when player collide with that coin. I have tried in many ways, but could not found anything ...
3
votes
2answers
820 views

How to script enable VR in Unity 5.1

Unity 5.1 has integrated VR, its in the Build Player Settings as a checkbox. I want a startup scene that is not VR, then when the user starts it enables the VR camera. Can I do that?
1
vote
0answers
37 views

Disable system sounds in Unity?

I've got an editor script in Unity 5 that uses the cursor position in the scene view to change objects in the scene when you press the space key. This all works perfectly, except that Unity thinks ...
1
vote
0answers
46 views

How can I center a WebGL window in Unity?

I have a WebGL build for my game, however, I'm getting frequent requests to center the image. Right now it is left justified. How can I center the WebGL game window?
0
votes
0answers
61 views

Making the CCTV and its Detection Area Pointing to the Player on Unity 5

I am now playing with the Unity Stealth project. Goal I want to make the CCTV pointing to the player (a sphere) instead of playing its rotation.y animation when the CCTV detection area is detecting ...
3
votes
1answer
182 views

Unity: C# Spell System

I couldn't find any proper tutorials in the internet how to make one so I tried it myself. I've written a base "Skill" class with methods like Cast(), DealFlatDamage(), ShootProjectile() and they all ...
0
votes
1answer
74 views

Show procedural map without running the game?

Currently I have a script that generates prefabs by code and I'm wondering if I could show a certain "seed" of that map without actually running the game. The reason why is that I often want to tweak ...
0
votes
0answers
50 views

Detect collision without reaction

Okay, so this has been bugging me for quite some time now. I'm making an old school platformer type of game in 2.5D, I want objects to pass through each other, but I still want a collision to be ...
2
votes
1answer
512 views

How do i play mp3 files in Unity Standalone?

I am making a game in Unity in which the player can select music files in their hard drive to use them in-game. I use the WWW class to load the sound files, but this only works for OGG, WAV and ...
0
votes
0answers
88 views

How to programmatically create an animation that linearly interpolate between two rotations?

I would like to programmatically create an animation that linearly interpolate between two angles (using the shortest path). I wrote the following code : Animation anim = gameObject.GetComponent<...
0
votes
1answer
117 views

Spawning random objects at random positions in the 3D world

My main character can move horizontally and not vertically. It can move from x = -4 to 4 and z = -4 to 4 (a square area). I don't want objects to spawn where my character can move but every where else....
0
votes
2answers
110 views

how to check mouse is not over any object in unity

Im working on a way to check mouse is not over any object on scene to put my object in there. i know i can use OnMouseOver function but i have to add it on all objects script. Is there any other way ...
0
votes
1answer
40 views

Change material emission for a second then go back to default

I'm looking for a way to change the emission of a material for a second then get it back to where is was by default Here's what I have for now float emission_lvl = 5.0F; float emission_lvl_start = 0....
0
votes
2answers
135 views

Aiming direction using mouse

I'm using the following code to rotate my object using mouse, for aiming direction. The only problem with this is that it only rotates between 0 to 180 and not full 360 degrees. Can any help me locate ...
1
vote
2answers
119 views

Change Camera Contrast in VR Game

Hello there Firends , I'm developing a Virtual Reality game in Unity. As in every VR game , i have 2 cameras for stereo rendering. I want to show the same object in each camera having different ...
6
votes
3answers
544 views

How to create a material with variable color

I'm new to Unity and trying to create a Carrom game. Since all the White and Black pieces, Queen basically have the same material and physical properties and texture except for their color, I'm trying ...
3
votes
4answers
4k views

Detect collision from a particular side

I'm making a platform sidescrolling game. All I want to do is to detect if my character is on the floor: function OnCollisionStay (col : Collision){ if(col.gameObject.tag == "Floor"){ ...
0
votes
0answers
55 views

What is the best way to represent a large field of objects while using minimal resources?

I have recently started to plan a project in Unity that will be for android. I have a database that consists of over 150,000 stars (may trim this down if I/O cripples the overhead). The game will ...
2
votes
0answers
129 views

Tower Defence stat storing system

I'm trying to find a smart way to store and retrieve stats for a tower defence game, but am currently unsure as to which approach would be best. Description: The stats system should quite basic, ...
0
votes
2answers
101 views

Get Particular Object's collision status via C# script

My current scripts creates and modifys the location of various prefab objects as they go along the screen. One of the things I want to find out about the active object is whether it has collided with ...
7
votes
2answers
4k views

How to make Line Renderer lines stay flat?

I've noticed that as I add more vertexes to a Line Renderer line the line twists and stops being a smooth line. .GIF Here: http://i.imgur.com/hRAhCXM.gif All lines are on the same z level, even ...
2
votes
3answers
178 views

Game Object is Instantiating on same position

I am working on a small project . But now I have come across a problem . The problem is the prefab is instantiating on the same position . I want to instantiate a box end to end . The basic set up is ...
1
vote
1answer
112 views

How to reproduce this triangle filling scanline effect using a shader?

I'm writing a renderer for an old DOS game were 3D polygons were rendered in software. I'd like to simulate, using a shader, the following material/effect, used for filling a triangle : The fist ...
1
vote
1answer
153 views

Rigidbody AddForce() skipping/teleporting

I'm surprised that this issue is nowhere to be found on these forums... Well at least when I searched. So, on my setup I have created a cube and applied a Rigidbody to the object with the following C# ...
1
vote
1answer
55 views

How can i create a 2 player turn-based board game on a separate android device using unity? [closed]

im trying to make a 2 player turn-based board game, i have already made the connection between 2 device. I used photon. They both connect but i don't know how to sync them both to the game. can any ...
1
vote
0answers
13 views

How to add (not blend) non-looped animation clip to looped animation with Mecanim?

I have a GameObject with Animator and looped animation clip. This animation changes X coordinate from 0 to 10 and back. I need to add another animation to the first one that increases GameObject's ...
0
votes
0answers
91 views

Weird squares everywhere

So in unity I have some weird squares on surfaces of certain objects, which are buildings represented by planes: I don't know what causes it, I tried changing some settings in lighting and material,...
1
vote
0answers
103 views

How to navigate through google Map in unity [closed]

I am working on loading the google map and navigating through the map. I have loaded the google map which shows the current location in unity. Now I need to show the direction from Place A to Place ...
1
vote
2answers
1k views

Usage of math.Atan2 in a 3D coordinate system with Unity

I have a simple question on usage of math.Atan2 function with Unity in a 3D environment. I found this code on Unity's documentation for Math.Atan2. I changed it a bit to fit my needs. Vector3 ...
1
vote
1answer
242 views

How to play an animation backwards in Unity?

I know this question has been asked before but it all involves using the Animation(?) component, so that is no longer any good in Unity 5.3.1f1, I explain a bit more later. I'm trying to simply get ...
0
votes
0answers
103 views

Enabling VSync results in stuttering

With VSync disabled my FPS doesn't drop below 100. When I enable it my FPS sits in the 55-60 range. The issue I have is that I have fast moving platforms that move at a constant speed, so a single ...
0
votes
1answer
61 views

Unity test/Play mode window problem

I tried to find an answer to his problem but i wasn't successful. When i press play to test my game, instead of the play mode going to the Game tab and play the game there, with all the unity tabs and ...
0
votes
2answers
71 views

Detecting Left and Right Mouse clicks on UI Text objects that are dynamically created

So, in my game I create a bunch of UI Text game objects dynamically (in the C# script), but I just can not find out how to properly detect Left and Right mouse clicks on these UI Text that were ...
0
votes
1answer
111 views

How to detect a sign-out from Google Play achievements or leader-boards UI?

I am making an android game in Unity (C#), in which I've used the Google's official plugin for Google Play Services. My question is how to detect that a player has clicked on sign out button on Google'...
0
votes
1answer
152 views

My character gets stuck when It's running on a straight level ground

My project is an infinite runner that goes right in a straight line. Sometimes when it just runs without jumping the Player stops. Sometimes the Player doesn't stop. When you jump the Player usually ...
0
votes
2answers
4k views

2D Water Shader [closed]

I am trying to build a 2D Water shader and I am using Unity but the plateform isn't a problem. Here is an example of what I am trying to reproduce : Limbo water shader Are there any good tutorial or ...
1
vote
0answers
75 views

Jagged Edges Even With Anti Aliasing 8x Multi Sampling

I have an interior scene where I have imported a model for the apartment and many of the interior objects such as lamps, windows, etc. Unfortunately I have a lot of jagged edges on almost all the ...
1
vote
0answers
40 views

Creating Slide-In Text [duplicate]

I want to make my text slide like so: This is from the game "Crossy Road". The movement is normally smoother that in the .GIF Here are some more frames from the GIF to make you understand what I ...
61
votes
6answers
56k views

What are the pro/cons of Unity3D as a choice to make games? [closed]

We are doing our school project with Unity3d, since they were using Shiva the previous year (which seems horrible to me), and I wanted to know your point of view for this tool. Pros: multi platform,...
0
votes
2answers
7k views

Unity 5: Error when everything is okay(Object reference not set to an instance of an object)

i'm getting this error when the collider colides with something: Object reference not set to an instance of an object It's referencing to the gamecont.Death(); from this script: and the death ...
-1
votes
1answer
149 views

Quaternion.Lerp not working properly in Unity3d

I'm using Quaternion.Lerp to rotate a joint with a certain angle, but when I use the below code I find the joint rotating very far although I specified it to rotate with only 5. Any thoughts please? ...
2
votes
2answers
475 views

What's the difference between Mathf.Lerp and Mathf.SmoothDamp

I want to smoothly go from one value to a new one (moving a slider or changing color). I tried using both functions and they all basically give the same result. What is the difference between them and ...