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)

1
vote
3answers
485 views

track how far player is from finish line

We are developing mobile racing game.We are looking to implement tracking system. For example if four players are on race track then in up side of screen one slide bar type line will be there whcich ...
-1
votes
1answer
15 views

Checking collision from below using OnCollisionEnter

Want to use OnCollisionEnter to see if there is a collision from below. void OnCollisionEnter(Collision other) { foreach (ContactPoint contact in other.contacts) { ...
1
vote
2answers
191 views

Is WWW reliable for downloading a large AssetBundle?

I have a very large AssetBundle. More than 200MB. Is WWW reasonable for downloading it from my server? I heard that you can't tell the timeout it has. I intend to use it for iOS and Android. Since ...
0
votes
1answer
24 views

unity animation not starting

I have written the following code: public class TargetAnimation : MonoBehaviour { Animation anim; public AnimationClip Open; // Use this for initialization void Start () { ...
0
votes
0answers
19 views

Creating a Tag-Team Mechanic

I am building an Sidescroller in unity and i came up with an idea to build an Tag System. We wanted the player to: Switch between the Main and the Assisting Characters Receiving Benefits from the ...
0
votes
0answers
16 views

Automated Polycount reduction on an animated humanoid mesh - any solutions out there?

I was wondering, is there a solution which will decimate the polycount optimally on a rigged and animated mesh whereby the quality of the animation clips wont suffer too much? I am creating a mobile ...
0
votes
2answers
53 views

How to get input for movement?

I'd like to input a direction on the controls then it send the player straight to that location. I'm trying to achieve an 8 way directional thing the play only needs to be able to travel to one of the ...
0
votes
0answers
18 views

How to Create Characters Classes for an Sidescroller

I am using Unity Programming in C# to build an Sidescroller 2D Endless Runner and building 4 classes: Warrior, Rogue, Mage and Ranger. It would be like: void PlayerCharacter() { Move(); ...
0
votes
0answers
3 views

Prime31 Plugin Error : “Plugin 'P31RestKit.dll' is used from several locations”

I got the following error, when i tried to install "Prime31: MicrosoftAds_2015-04-22" plugin in Unity 5 Plugins colliding with each other Plugin 'P31RestKit.dll' is used from several locations: ...
0
votes
1answer
15 views

Play audio clip from where it left

I spent some time playing with AudioSource.time & AudioSource.timeSamples and read some posts about them. So I get that due to audio compression I can't rely on .time for accuracy so I need to use ...
-1
votes
1answer
17 views

Players Health getting recuded only once when attacked [duplicate]

I made a game in Unity 2D Issue: I have made some spikes and other aliens, which decreases the players health if they come in contact. The health only decreases once instead of getting decreased ...
1
vote
2answers
88 views

How can I manually call/fire OnTriggerExit() for colliders a trigger is inside of in Unity?

In Unity, the OnTriggerExit() method is not called/fired (not sure if it's an event or not) when an object is disabled or destroyed within it's collider. In comparison to it being fired is an active ...
2
votes
2answers
262 views

How to use an A* Pathfinding System across uneven environments?

I am developing a game in Unity3D. I want an enemy character to follow the player around. The problem is, my surface is uneven and full of mountains. I am using aarongranberg's pathfinding project. ...
0
votes
1answer
18 views

Unity3D WWW get HTML displayed in browser

I currently have in a web page, on a localhost server, some information that I want to use in Unity. My problem is that this information are stored in some js variables. I tried to use the WWW class ...
1
vote
1answer
186 views

Shader that draws just vertex points

The game I am developing is in unity and I want to make a shader which can be put on a mesh that only 'draws' color on each vertex point. I am not proficient with shaders, and out of all my searching ...
2
votes
2answers
79 views

Is Physics2D.BoxCast a safe alternative to a row of raycasting?

Raycasting in rows is a common practice. Is using the Physics 2D BoxCast function a good alternative to using multiple raycasts spread out (an example use being collision detection in a custom ...
6
votes
1answer
912 views

How to occlude lights in Unity3D?

First off, I own Unity Pro. I've been looking in to occluding lights when they aren't being viewed for a while now to improve performance. The main methods I ran in to were using BecameVisible() and ...
0
votes
1answer
114 views

Problems with Raycasting Requirements

Im working on a script which kinda works like an Enemy AI. Its kinda like a detection system with requirements that are required to be met. This is a recent question i asked using my code Raycast ...
0
votes
2answers
27 views

Ping Pong bat is not detecting the collision with the wall

I have been learning Unity for last couple of days. I want to make one simple ping pong game. The idea is simple. The game has a Sphere as a ball, a plane as ground, 2 rectangles as bats and 4 ...
0
votes
0answers
6 views

Canvas auto reset or hide

We are developing 3D racing game. The thing is after some time our Canvas UI is getting auto reset or hide. Suppose I added Canvas to character controller then its getting hidden after sometime but ...
2
votes
1answer
93 views

How do I fix the duplicate files problem in MonoDevelop?

MonoDevelop-Unity counts some files twice in a project of mine. This is very annoying, both for the "go to declaration" feature, and for the search (who finds twice anything who it would find). Not ...
0
votes
0answers
7 views

pivot of a 3d model outside its mesh after importing into Unity3d

as you can see, the pivot is outside my mesh. I want to use the pivot for rotating around, for that I need to set the pivot to the real "rotating point". I know that there's the SetPivot script, but ...
0
votes
2answers
31 views

How to prevent the player from calling the Jump function if no collision is detected?

I am back once again. This time with a basic 2D platformer game. I would like to allow my player to jump but only if the ground bool checks as true. I would like to fix my script so that upon ...
1
vote
1answer
92 views

Physics not working when game is running on device Unity

I have my bouncing ball game. The ball bounces up when it hits the ground and when it hits the left wall it changes direction to right and when it hits the right wall it changes direction to left and ...
1
vote
2answers
506 views

Angled topdown perspective camera for 2.5d game

I have a 2d tile based game created using Unity's 2d tools and orthographic camera: The tiles are created by programmatically generating a mesh, assigning a texture to each pair of triangles, and ...
0
votes
3answers
2k views

Going from WPF to Unity3D, how to implement the MVVM-pattern?

I've been working with MVVM in WPF for a long time and I'm now trying out Unity3D for a GUI-driven application. Can I work with view models and bind them to properties in GUI-components? I guess the ...
0
votes
2answers
21 views

Color submeshes in unity3d

I have a mesh that has 10 submeshes, I wonder how I can change the color of of these submeshes to a different color (e.g submesh1 will have a red color, submesh2 will have a blue color,...etc). Any ...
4
votes
1answer
338 views

How can I expose a property to Unity that should be treated like an asset path?

I want to be able to do something like this: public FileInfo XmlBehaviourFile; And then use the asset browser in the Unity editor to select an asset. Ideally, I would like to limit it to XML files ...
1
vote
1answer
15 views

Share a function between two passes inside CG Shader for unity3d

I'm writing a shader in CG language for Unity3d. When making transparent object you need to create two similar passes in SubShader. First to render only back faces (with Cull Front) and second to ...
0
votes
1answer
224 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?
0
votes
2answers
24 views

unity animation won't play unless input key is held

The code is simple. If the player presses the right arrow key, one animation clip plays. If the left arrow key, another clip plays, etc. However, the clip doesnt play fully unless the input key is ...
0
votes
2answers
40 views

Rotate Character towards Moving direction

So my Problem is that my Character is always shooting in the way it is looking. Unfortunaly my solution seems to be a very bad one. I am not really cabable of aiming with my solution. Neither with ...
0
votes
2answers
1k views

How to find objects in front of my player

I am trying to find an object that is in front of my player sprite using the following code RaycastHit2D hit = Physics2D.Raycast(transform.position,Vector2.right,EnemyLayer); //EnemyLayer is the ...
0
votes
0answers
36 views

Player not getting destroyed when its attacked [on hold]

I made a game in Unity 2D, it was working fine But when I upgraded from unity 4.3 to unity 5.0 some of the collider are not working properly. I made the game objects again but still the problem ...
1
vote
1answer
127 views

2D Infinite Runner : how to manage background layers?

First of all, sorry for this post, I guess this already has been discussed. I browsed stackexchange and the web but I couldn't seem to find a clear information for my case, with always mixed results. ...
-1
votes
0answers
30 views

Water jetpack effect [on hold]

I am working on mobile game,the requirement of game is to have water jetpack. I want to achieve water effect something like we see in jetpack joyride, https://www.youtube.com/watch?v=bW-hz3GUGSo ...
0
votes
1answer
46 views

Access different vertices of a Mesh Unity 3d

I have a mesh and I want to color each group of vertices with a certain color. If anyone could please advise how this can be done in Unity using coding?
0
votes
1answer
139 views

Check if object is overlapping

I have two objects, both of them with polygon colliders. When I click on one of the objects, I want the player to drag it on top of the other object (without collision). If there is overlap when he ...
0
votes
1answer
117 views

Can I post to Facebook with my own text from Unity on behalf of the user?

I'm using Facebook SDK for Unity 6.0 with FB.Feed. I'm trying to post a link to the user's feed, text and link on his behalf. So far I've managed to publish only a link and its details, the part ...
0
votes
1answer
19 views

Unity - “SetDestination” can only be called on an active agent that has been placed on a NavMesh. UnityEngine.NavMeshAgent:SetDestination(Vector3)

I'm using Unity5 right now. I got this error when try to setDestination. "SetDestination" can only be called on an active agent that has been placed on a NavMesh. ...
0
votes
1answer
85 views

Fb.Feed dialog closes before saving

I'm having trouble with the Facebook UnitySDK when I use the FB.Feed() method for posting on user's timeline. The share dialog closes before the post is completed, Right after i press the "Post" ...
0
votes
0answers
18 views

Is it possible to generate a Spheremap from a Texture2D in Unity at run-time?

I was trying to create a spheremap from a Texture2D for a skybox at run-time (Standalone build) in Unity. Does anyone know if this is possible and how to do that in Unity? In the editor you can set ...
1
vote
1answer
242 views

Decentralized Matchmaking in Unity?

I'm making a card-playing game, similar to Magic Workstation. I've been looking into several options for networking. I have a working LAN version with the build in Unity networking, as well as Photon ...
0
votes
1answer
33 views

Is there a way of moving the transform of an object relative to it's geometry

I have a number of objects (mostly prefabs) that have their transform origin in inconvienient places such as about 1 unit to the left of the actual geometry or somewhere inside an object where it's ...
0
votes
1answer
117 views

How to create planets

I need 3D planet models for my game. I can add objects onto the planet and add the sky by myself, but are there any good modeling tools for creating big spheres that would allow me to add mountains ...
0
votes
2answers
65 views

Creating a static 2D background at runtime

I'm using unity for a 2D game. We have a lot of props for grass, plants, flowers, etc that are static and always in the background. I'd like to optimize the background and reduce the drawcalls as ...
0
votes
2answers
28 views

Unity - Text not properly align

My text doesn't seem properly align to top left even I already set it in Rect Transform. Please advice. Thank you.
-3
votes
0answers
87 views

How powerful is Unity, and is it fit for large-scale projects such as AAA games? [on hold]

I've seen Unity been used in several indie games, however I haven't actually seen it been used in a large-scale project. Why is this? If it's due to the lack of power, what areas does it lack in? ...
1
vote
0answers
21 views

Changing an Image's alpha through an animation in Unity

I'm trying to change an Image's alpha through a legacy animation in Unity, so that it fades in and out in a loop. The animation works: I can see the color updated in realtime in the inspector. But the ...
1
vote
2answers
251 views

collision in different layer

I have a game object called game object 1 on screen. It holds an image called red . when i drag an image called "animal" on a game object 1 collision happening fine and destroys the "animal" in same ...