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
2answers
26 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
20 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
votes
2answers
48 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 ...
0
votes
0answers
24 views

Only Instantiate once? [on hold]

How do Instantiate only once? This script continuously create clones. GameObject[] cubeParticules; foreach(GameObject part in cubeParticules) { Instantiate(part, temp1, ...
0
votes
0answers
27 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 ...
5
votes
3answers
386 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 ...
2
votes
0answers
67 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, ...
-1
votes
0answers
20 views

Button Designs Download [duplicate]

Where can I find and download pixel buttons (images) like the one below? I wish to implement them in the Unity game engine. Do you know any sites?
0
votes
2answers
57 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 ...
0
votes
1answer
49 views

Set input relative to map rotation?

I'm trying to figure out how I can make the input which looks like this : // Checks if player is pressing movement keys, if is applies force to specified direction if ...
1
vote
1answer
36 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
0answers
11 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
31 views

How to navigate through google Map in unity [on hold]

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
votes
0answers
40 views

How and Where do I start? [on hold]

I'm Nick, I want to learn how to develop games, I've seen videos that say start small, learn programming, use certain tools, but I have no idea where to start. One common tip across everything I've ...
0
votes
0answers
27 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
0answers
42 views

Kickstarter game development Contract [on hold]

I am wondering what I should do , I have started work on a game that is planned to be funded via kickstarter for the actual payment of me and the other members I'm fine being unpaid until the ...
0
votes
1answer
35 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
1answer
44 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
41 views

Make GameObject be in front of image? [on hold]

I have a 2D image that always stays in front of a GameObject. And I have a GameObject that's always behind it no matter what its Z position is. How can I make GameObject be in front of image?
1
vote
1answer
44 views

2d Player animation issue in UNITY 3D

I have a player and i want to move the player from left to right. I can move the player by the keyboard events.but the problem is that when i release the key the player animation should be idle. ...
0
votes
1answer
58 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
1answer
30 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 ...
0
votes
1answer
27 views

UI Text Won't Change Color in Unity 5

In Unity 5 on Windows 10, I try to change the text color from the Inspector and in scripts, but the color won't change. Here are some screenshots of my Text objects open in the inspector, with there ...
1
vote
0answers
24 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 ...
0
votes
0answers
33 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 ...
-1
votes
1answer
65 views

How do I build a 3D array result set from a compute shader in unity?

I took this right down to the absolute most basic scenario but for some reason I can't get anything back from the GPU when this completes, could someone explain what I am doing wrong ... Here's my ...
0
votes
0answers
23 views

Unity crash on development build

Every time I check the development build, my game crashes just after turning my screen black. To be more specific, I've tried to create a development build of my game using Unity 5.3 on Windows 8. I ...
0
votes
0answers
32 views

Help creating an animation in Unity? [on hold]

How can I create an animation that looks exactly like the one below (the moving hand pointer)? I have no idea on how to start. Thank you for your help.
0
votes
0answers
28 views

Unity voice chat in multiplayer [on hold]

I'm a very beginner in Unity development, so please bear with me, if my questions are a very simple. So, I would like to know, what are the possibilities to integrate Voice Chat to Unity. I'm about ...
1
vote
1answer
66 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 ...
0
votes
2answers
58 views

How to know when user has stopped dragging

How can we know when user has stopped dragging fingers over screen if user has not removed finger from screen but stopped dragging ?
1
vote
2answers
60 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 ...
0
votes
0answers
28 views

Unity3D :Player won't go back to idle state

I'm creating a topdown 2d click to move game on unity (as most of you may already know due to recent post) and having trouble with the animation. I created two states, idle and walk, in the animator ...
0
votes
1answer
83 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 ...
0
votes
1answer
31 views

If I save some information with PlayerPrefs, they will remain saved even if the game is online?

If I make a game in unity and I use the PlayerPrefs function to save the progress and load it in another play, that information will be stored even if the game is loaded on an online platform? I mean: ...
3
votes
1answer
78 views

Unity3D - Screen Capture of particular UI elements

How can I screenshot particular UI elements? In my case I need screen capture UI Panel with child objects like UI Text, UI Input and etc. Please take a look at picture. Thanks in advance
1
vote
1answer
41 views

Raycast a ray to the tip of another ray

I'm using unity to raycast a line from the center of my camera viewport to a world position (yellow line). I also want to cast a ray from the center of my character to this same point (blue line). I ...
0
votes
2answers
34 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
0answers
21 views

Abstract Factory Pattern for Implementing AdNetworks on Multiple Platforms [on hold]

Here's the link to the github project. I want to implement Abstract Factory instead of adding platform dependent compilation flags in just one file and make it ugly. Hence decoupled code. Moreover, ...
1
vote
1answer
50 views

Replicating a worldspace sphere on screen space

I have quite some struggle with a post processing shader that I'm working on. I use Unity, and I have a shader in which I want to, in screen space as part of post processing, render a sphere that ...
0
votes
1answer
57 views

WWW & crossdomain

I'm trying to use the WWW class to connect to a restful service located on a server. The service I'm trying to connect to is located to a specific port (8080 in my example), and my application cannot ...
0
votes
1answer
129 views

Displaying Trajectory Path [on hold]

How can I display trajectory path exactly as in this image? I have used void OnDrawGizmos, but that only displays trajectory in the editor and without any arrows like shown below. Trajectory with ...
1
vote
0answers
28 views

How to receive broadcast message in Unity?

I am trying to get the broadcasted message in overridden method of NetworkDiscovery.OnReceivedBroadcast(). For that what I had done is below: I create class which implements NetworkDiscovery where I ...
0
votes
1answer
34 views

Unity - Toolbox pattern is not safe

When I create a toolbox such is in this tutorial. How do I defend against breaking the pattern with multiple instances like this: gameObject.AddComponent<Toolbox>(); ...
0
votes
1answer
35 views

How to adjust the width of a LineRenderer

I wrote a code that draws a line by mouse movement. I am searching for some way to give it pencil style and head and end of the line have thinner width. As we know the LineRenderer draws the line ...
2
votes
3answers
77 views

How to dynamically create an UI text Object in Unity 5?

I have been searching for something that should be simple, but Unity 5's documentation on that is fairly outdated. What I want to achieve is to be able to create UI Text totally from script, i.e. ...
1
vote
1answer
44 views

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

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 ...
3
votes
2answers
81 views

Efficient use of pathfinding [closed]

I'm doing a post-mortem on my game project, and this problem kept bugging me as my team couldn't solve it throughout. So my game is a pure 2D top-down shooter built with Unity3D, with enemies ...
-1
votes
1answer
14 views

NavMeshAgent in unity not working

I am making a game in unity and it is throwing the error "Failed to create agent because there is no valid NavMesh" and i don't know what the problem is. using UnityEngine; using ...
0
votes
0answers
29 views

Script getting unchecked upon running [on hold]

I have a script attached to a game object, with the following content, but when I press play, the tick next to the script component disappears. I cannot figure out which line in the script is ...