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

StopCoroutine is not stopping my coroutine in Unity

I'm getting some attacking to work with my units and I noticed that the coroutines seem to start adding up even after the StopCoroutine(IEnumerator) as need called. I dug around on ways to perform ...
0
votes
0answers
13 views

how to influence the vertex?

// Attach this script to a camera and it will // draw a debug line triangle triangle // at the triangle where you place the mouse. function Update () { // Only if we hit ...
0
votes
0answers
13 views

Check if is object in camera field and not covered by other object

I know how to check if object is in camera view but how I can check if that object is cover by something elese? In my case I want to turn on or off some effect when I look at light. At this moment my ...
0
votes
0answers
18 views

How to update gametag and call a new animation? [on hold]

I want to change the tag of an game object when a new animation is triggered by the animator parameter. This works, but when my gameObject tag is changed from "fire0" to "fire25" it doesn't change to ...
1
vote
0answers
20 views

Unity - C# - Angle tile not instantiating [on hold]

I'm currently connecting two rectangles with a 'L' shaped line. I have written the code so that it cycles for every position from one rectangle to the other and instantiates some gameObjects that ...
2
votes
3answers
44 views

How to “merge” multiple intersecting circles so that only the outer edges of each show?

In my RTS (In Unity) each unit or building has strategic circles in a similar fashion to SupCom. If you have multiple units or buildings selected it looks like the picture to the left. I want to make ...
0
votes
0answers
25 views

Adding some recoil to the Camera

I just want to add some recoil to the camera, but I can't find a working script. It's an fps, so I take my mouse axis to rotate the camera. And now I want a pushback to the top, so that the camera ...
0
votes
0answers
18 views

Efficient billboarding sprites in Unity 5

What's the most efficient way to do billboarding sprites in Unity 5? I want to make a forest of sprite trees in 3d space. Those sprites need to face the camera at all times. I am working on VERY ...
-1
votes
0answers
34 views

How do I create a circular progress bar in Unity3D 5?

I am new to programming and Unity3D. I want to show a circular progress bar starting invisible and growing in 3 seconds to a circular line when reloading is done. How can I do that?
2
votes
1answer
43 views

Unity : callbacks in component based design

I am trying to use component based design in Unity3d v5. If I have 2 separate C# scripts attached to enemy ships like below: Script1.shipDead() - Remove game object and show explosion animation ...
-1
votes
1answer
26 views

'The thing you want to instantiate is null' - unity error when instantiating

I have a Game Object called 'car' in my Assets folder. I have this code in C# unity to instantiate it. GameObject car; void Start () { Vector3 position = new Vector3(5, 5, 5); ...
0
votes
2answers
29 views

Instantiate a prefab on unity and make it appear at a specified coordinate

I have a prefab called 'road'. How can I instantiate it using C# script so that the instantiated object appears at coordinate (5,5,5) ?
4
votes
2answers
207 views

Callback on Derived Class?

How does Unity3D implement their system where if a class is derived from MonoBehaviour and has certain methods like Awake() or Update(), they are called accordingly? I want to do a similar system for ...
2
votes
1answer
69 views

Unity C# - My parameter 'campfireNew' does not exist (SetTrigger)

I'm trying to set a SetTrigger parameter to call a different sprite animation on a campfire. I tried this also with a boolean, yet again the same error. parameter 'campfireNew' does not exist. Anyone ...
0
votes
1answer
70 views

Using collectable items to change a gameobject Unity

I’ve been working on a 2D platform side scroller. I’m rather new to Unity and C#. Basically what I’ve achieved so far is a character which can collect Logs throughout the game and those logs are ...
1
vote
0answers
34 views

How can I get the pressure of a touch in Unity?

Does anyone know how to get the getPressure function from the Android API into Unity? Or is there another way I can access the pressure of a touch?
2
votes
1answer
28 views

Change Tag of Instantiated Clone

In my game there is a bird flying up and a stream of containers (baskets) is moving from right to left of the screen in the bottom. Baskets are being Instantiated on right and get destroyed when they ...
3
votes
1answer
29 views

Unity - C# - Overlapping Rectangles not separating

I am Instantiating a lot of Rectangles of different sizes (ranging from 3 to 18 units) and they all have attached this script, which should cycle through all the GameObject List which contains them. ...
10
votes
3answers
1k views

Looking for some insight on programming design for attacking and attack types in a game

So, I'm starting to introduce attacking to our 2D space RTS (This is in Unity, so it's component driven). Initially it was as simple as "enemy in range, damage applied". However there will be multiple ...
0
votes
0answers
12 views

problem with build android version from unity

I want to export my games in unity to android but i can't. each time I try I get this error: CommandInvokationFailure: Failed to re-package resources. See the Console for details. F:\Android SDK ...
4
votes
2answers
468 views

Alternatives to remove Unity splash screen after developing a game with the free version?

I developed a simple game using the free version of Unity. I want to understand how much it would cost me to remove the Unity Splash Screen to know if it's worth it. Right now Unity professional ...
0
votes
2answers
55 views

Endless level support in modern engines? [on hold]

Do any of the "next gen" engines support endless 3d levels? The general idea for my game will require the ability to stream a level seamlessly (no loading screens), similar to games like for example ...
4
votes
2answers
28 views

Unity UI square that fills width OR height

I'm trying to create a board with this requirements: It SHALL be square. It SHALL fit available width OR height. It SHALL be centered in the canvas. It MAY be wrapped into as many additional ...
-1
votes
1answer
22 views

move a spaceship player inside an Orthographic camera, unity [on hold]

I'm creating a 3d shmup in an Orthographic camera, and I want to move the ship inside the camera, instead of move all the environment. The problem is that i can center the ship in the camera when the ...
0
votes
2answers
30 views

Stop Lerp at relative location?

In my Unity 2D platformer, I'm trying to move the camera down a bit when the character is crouching but not moving. I've done this with the following: cameraPosition = ...
1
vote
1answer
41 views

How to create a ladder script in Unity [on hold]

I tried to create a climb script and found some similar code. I would like to climb with my player on a ladder. I came up with the following: bool canClimb = false; float speed = 1; GameObject ...
1
vote
1answer
84 views

Unity - Basic AI Enemy Follows Player - Prevent Flocking Of Enemies Together

I'm in the process of implementing a 2D top-down shooter game. I have a basic AI script that allows enemies to follow the player around. Currently it works fine for one enemy, but as soon as there are ...
1
vote
1answer
57 views

How to add a UI Text for keeping Score in Unity 5

My Problem is simple I want to show scores on my game. The examples on internet are good but in Unity 5 there are no GUI elements but instead these are now UI elements. I was following this example: ...
0
votes
0answers
11 views

Unity refracted plane [on hold]

I'm new in Unity. I want to get some idea to create refraction rectangle. Here example. I need to simulate real refraction process with air and glass etas. Thanks.
-1
votes
1answer
62 views

How to attach 2D object to a rope?

I was wondering, how I can attach a game object (player) to another object (a rope) when both came in contact in Unity. I think it should be done with a OnTriggerEnter2D, but doesn't know how I should ...
0
votes
1answer
41 views

Projectile Shoot three at a time

In my game there is a bird flying and on touch it throws different artifacts projectile downwards. And these artifacts should hit the containers moving right to left on the screen. Now if user keeps ...
0
votes
1answer
31 views

Unity3D - Cancel a build process (Windows, Unity 5)

I accidently pressed build for iOS and just realized that it might take a few hours to build the project. I tried to kill the unity process in the task manager, but on next start up unity instantly ...
0
votes
1answer
40 views

In Unity for Android, how do I create touchable buttons?

I'm making a test game for Android in Unity 5, and I want to add left-right control buttons like the circles below, to move an object left or right. How can I do this? Sorry if this question is ...
0
votes
1answer
57 views

how to Move Player on “Z” Axis 2D Movement

first im little new to unity..currently im working on 2D game mobile game.and im using Stranded Asset(Mobile) Single Joystick prefab to move Player..Currently my player move on X and Y axis. can any ...
0
votes
1answer
37 views

Input.mousePosition gives a NullReferenceException

I'm trying to Add raycast shooting to my player but when I get the Vector2 mouse position it give this error NullReferenceException: Object reference not set to an instance of an object This ...
0
votes
0answers
73 views

About Developing Games [on hold]

I am starting from scratch for a project to develop a game but I wanna start with just mind games like memory game that shows photos on grid and then disappears, something very easy as step one So I ...
0
votes
1answer
29 views

Unity animator controller animations don't work

I'm having problems animating a character pack I purchased from unity asset store. I've placed the character in an environment and created an animator controller. After I drag the animation that to ...
0
votes
0answers
34 views

What the polycount limit for a mobile game character (heavily animated) is like if no shaders/lighting used in an otherwise simple scene?

I am making a few mobile game characters that will be heavily animated using about 15-20 bones. I am at the modeling phase of my game and just wanted an idea really. Good thing is that each level will ...
-1
votes
1answer
38 views

C# Unity3D - How can I use a INT from other classes?

I have 3 Objects Capsule 1, Capsule 2 and Capsule 3. Every Capsule has a script on it for health/damage. It also contains an int for hits and points. Hits should be increased by one for every bullet ...
0
votes
2answers
49 views

After sometime increase the speed of Instantiated object

This may look similar to "increase speed after every N seconds" type question but it's different because objects are being Instantiated and getting destroyed. In my start() method I'm calling a ...
1
vote
1answer
18 views

My .FBX model is not picking the .TGA texture file

I'm at a complete loss. An artist has sent me a 3D model so I can test it in Unity. This is exactly what I got: - Guy.fbx - Guy_DIF_512.tga Alright. So I move the folder into the Unity ...
0
votes
1answer
35 views

How to send object transform position coordinates over UDP from Unity 3D

I'm using Unity 3D for the first time (university project) and need some help. I'm trying to send the x, y and z coordinates of an in-game object over UDP (I'm also very new to scripting), below is a ...
2
votes
1answer
66 views

Stretch the game to fit the game window, in Unity 5

(Desktop) I want to make it so that when the user re-sizes the game window, the game is stretched to fill the window. (Similarly, for Android) I want it to be stretched to fit the screen as well. ...
2
votes
2answers
357 views

How do I save and restore an int value with PlayerPrefs?

I am stuck on how to save the player's amount of money. When I build the game in the exe as soon as I shutdown the game my money value gets lost. I want this money to be saved. I am using the ...
0
votes
2answers
49 views

C# Unity3D FPS apply damage to an enemy (Weapon bullet)

I am kindly new to Unity3d and c# and I don't understand how I could let a bullet deal damage to an other object. I've seen a lot of JS tutorials but no for C#. I've tried to use them, but it wont ...
-2
votes
1answer
33 views

Script to change size of a cube when pressing a button [on hold]

I am very new to coding and very bad at it. In my environnement there is a table, and i would like, after pressing a keyboard button, to make a cube appear. Then, by pressing another button, i would ...
0
votes
2answers
119 views

Optimizing file-size of a sprite-sheet for a 2D game

I have a question regarding the method of creating a sprite-sheet so that it will not consume to much disk space and still preserve graphics quality. I was researching about this topic and found ...
0
votes
1answer
46 views

After collision of two objects change the sprite and move in its direction

I've searched a lot for this question but there was no answer that could solve the problem I'm having. I'm new to unity and a very naive developer.I'm making a game in unity using c# and it's like a ...
1
vote
0answers
48 views

Rushing river water [on hold]

I am creating water in unity3d engine, I tried many shaders (flowmap,flow texture,etc) but I am not quite sure how to get the same effect displayed in the following img? http://imgur.com/KduUpaz
0
votes
1answer
42 views

Editing a new list of vector3's without changing the original list? (Unity) [on hold]

I just got Vectrosity for Unity and need to make a line of all the destinations for an object. Issue is that I need to use a single list of vector3's to create the line (as far as I'm aware). I have ...