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)

0
votes
1answer
432 views

Click to move - get NavMesh layer

I'm using NavMesh, and NavMeshAgent for my character movement and Pathfinding. I made a testing NavMesh with 2 area layers: 0 = Walkable 3 = Water. In have a click to move script, and i need to ...
1
vote
2answers
86 views

Collider not working

I have a 2D object (without a parent) with a 2d box collider (dimensions are not small) added to it and set as trigger when I place it in the scene it works just fine however when I instantiate its ...
1
vote
1answer
168 views

Seams between tiled textured cubes

I've created a textured cube in Blender, which I have uv-mapped like this: The tiles are 256x256, and I've mapped the coordinates exactly at the edges (e.g. x: 256, y: 512). I then export my model ...
0
votes
1answer
376 views

Unity5 TextAsset not functioning in WebPlayer

Preface I am working on a 2D Platformer in Unity5 utilizing TileMap techniques. I have a working system to read "Room Tile Data" from JSON files with the Unity TextAsset Class and the Newtonsoft ...
3
votes
2answers
360 views

Aligning pathfinding to the center of tiles?

I'm looking to achieve tile by tile movement in a project I'm working on. I employed the use of the asset Simply A* Path-finding to allow a unit to navigate the terrain. Since the tiles are ...
0
votes
1answer
68 views

Zoom in and switch scenes in unity

I'm trying to zoom in as my game is like a map and I have to click on a certain country to zoom in and change the scene to this country. So I want to zoom the camera slowly and then change the scene ...
3
votes
1answer
45 views

Render object with different shader depending on the camera

I have an object with a custom shader. When it is being rendered by cameraA, then I want it to render a particular way (ex red). When it is rendered by another cameraB, I want it to render a different ...
0
votes
3answers
2k views

Find closest point on NavMesh if current target unreachable

I have a mock environment set up with a cube that has a specified "Not Walkable" layer. I'm using NavMeshAgent and NavMeshPath to set destinations of the player. The way I'm setting paths is by ray-...
1
vote
1answer
83 views

How do I merge colliders in a tile-based game?

I'm doing a tiled based platformer in unity, and I was having some issues with collisions and I figured the problem was the way my colliders were arranged. So right now, my collision look like this: ...
4
votes
1answer
221 views

Apply a special effect to an scene area

My 2D game has a second camera on the scene that renders an upside down image of the scene and distorts it, giving the effect of water reflection. I render this camera first, and on top of it I render ...
1
vote
1answer
24 views

StartCoroutine from other MonoBehaviour is not working

I am trying to replicate the model of Unity documentation about coroutines, but I want to partition it in another class: I have these two: public class A: MonoBehaviour { void Start() { ...
1
vote
0answers
22 views

UNET Performance of (many) Kinematic Rigidbodies

I am building a game in Unity in C# using the UNET networking elements. I am trying to figure out what is the performance cost of kinematic rigidbodies? My understanding is that, when kinematic, ...
1
vote
1answer
118 views

Distance based item interaction

I'm having an odd issue in my implementation of distance based object interaction in Unity. Basically it's a simple "Press [key] to [search/pickup/open/etc]" function which requires the player to be ...
2
votes
1answer
485 views

Mesh deformation maya to unity

I have a model that has been modeled & rigged in Maya, whenever i export it as an FBX and take it into unity it seems to collapse at certain areas (see the attachments for a before and after). The ...
1
vote
1answer
69 views

Trouble GamePad input on iOS but works perfect on Android

I am having trouble getting input from on iOS devices (iPhone 6 Plus and iPad). Here is my code, if (Input.GetKey (KeyCode.JoystickButton14))// A { chr_show = "A"; } if (Input....
3
votes
2answers
825 views

Unity 2D Alpha cutout layer for Sprites

I'm trying to make a simple Fog of War effect for my 2d game, similar to these: . I want to have a sprite layer of black and then have a sprite to cut out itself from the black layer, leaving a ...
-1
votes
0answers
24 views

Unity player prefab issue [closed]

I am using this tutorial . http://unity3d.com/learn/tutorials/topics/multiplayer-networking I am up to step 5. I have filled everything to the tutorial however when I try drag in the player prefab it ...
1
vote
1answer
57 views

Detect Collision on Child Object

I've created an obstacle prefab. The Prefab has following hierarchy. The player must die if he collides with Enemy. But It detects collision with parent object. I am also uploading the screen shot ...
1
vote
1answer
863 views

Gradient fill color on circular sprite

I have a white circle sprite. I know how to change its color to a solid fill color. using GetComponent<Renderer>().material.color. But how would I give it a gradient fill color. I've been ...
1
vote
1answer
55 views

Coroutine doesn't continue after checking for bool

I have the following coroutine: public IEnumerator EndGame() { //StopAllCoroutines(); GamePauseController.instance.UnfreezeTime(); DisintegratorModalController.instance....
0
votes
1answer
31 views

How can i exclude “Y” from drag in unity?

I'm trying to make a moving object drag when no input is received, but i want the drag to only apply to X and Z variables, and not Y. Meaning i want it to fall at a normal speed, but when i stop ...
1
vote
3answers
2k views

How to make a horizontal scrolling menu in Unity 3d 4.5

I want to make a horizontal scrolling menu that will hold levels of the game .But i have a little idea about it so it would be very great if anyone help me with it
2
votes
1answer
19 views

Unity VR: How to draw camera on top of VRSettings.showDeviceView mirroring

We're using VRSettings.showDeviceView = true to mirror the VR display to the main window. We also have a camera that we'd like to draw over top of the main window's mirrored VR image. This other ...
1
vote
0answers
23 views

Unity3d Isometric moving forwards

I am making an isometric game using unity 3d and 3d graphics. I have been able to figure out how to create and isometric camera that follows the player, and a basic isometric moving script for the ...
0
votes
0answers
28 views

I have a zooming and parallax related issue in 2D game in Unity. [closed]

My 2d game have zoom in-out feature. And I have some objects as background of game that I don't want to zoom feature work for those objects. something like parallax. Here is my code: public class ...
2
votes
1answer
405 views

How to make unitypackage from allseen alliance's android sdk?

Im making an offline multiplayer for Android device by Unity and I found only one way to do this is the allseenalliance sdk. After download its from here I found that to use it I need to create an ....
-1
votes
1answer
180 views

Poker Game Multiplayer network logic [closed]

I created a single player poker game. Now I want to change it to a network game. I want to use Photon(for network) and Playfab(game server) or SmartFoxServer. My problem: I want to run important ...
1
vote
0answers
30 views

How can I get UI element over which pointer is in Unity3D?

I can detect if mouse is hovering any UI element by EventSystem.current.IsPointerOverGameObject(). But how do I know which GameObjest it is exactly? I have tried: if (EventSystem.current....
1
vote
0answers
28 views

How can I create click and drag for a 3D Jenga game in Unity?

Essentially, I am trying to create a game that mimics Jenga. Right now I have made it so that the blocks collide with each other and have gravity, everything works very well. The one thing that I am ...
1
vote
0answers
25 views

Top down controller script trouble

My game features a top down camera that follows the player as he moves via virtual joystick on a cellphone screen. I want the movement of the player to always walk forward and the direction will be ...
1
vote
0answers
16 views

How to add all MonoBehaviours of Scene into the List?

I've read an article 10000 UPDATE() CALLS. Author uses UpdateManager. It has Update method which calls Update method in all of other MonoBehaviours of objects. It works faster than calling Update ...
2
votes
2answers
320 views

Unity associated game object is null when running

I am just starting with Unity. I have two UI Text game objects, Atext and Btext. I have associated them by drag-dropping with my PlayerController script public variables, say public Text atext and ...
1
vote
0answers
11 views

How do I transition from anystate to die animation on Unity 5

I am using Unity 3d (5.40b, it's the latest version). I tried to trigger the animation with a trigger parameter. I couldn't get animation to trigger. Doing it that way it said something like "...
1
vote
0answers
22 views

Unity 2D animation running partially

I have a 2D skeleton animation of human walk cycle - which is fine. I am trying hard to code that should STOP only hands animation but legs should not (on a player input - for example on space bar ...
1
vote
1answer
54 views

onTriggerEnter(Collider obj) is not invoked on collision with a trigger or a rigidbody

void onTriggerEnter(Collider other){ if (other.gameObject.CompareTag("Pick Up")) { other.gameObject.SetActive(false); count = count + 1; setCountText (); } This is ...
4
votes
1answer
167 views

In unity 5 export package is not working correctly

I am using unity 5. I Created an objects with layer names. I tried to export a package. After Exporting, i import the package in new project and ran the project its not working. observed that objects ...
0
votes
0answers
41 views

How to make an explosion in unity c#? [closed]

I am trying to add a grenade launcher to my fps game in unity. I want the grenade to explode when it hit the ground. The explosion shouldn't destroy the ground but it should have an explosion effect ...
3
votes
1answer
64 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 ...
2
votes
1answer
200 views

How to deal with inconsistent network delay caused by packets arriving at different times in the frame?

I'm developing a multiplayer game that does not have prediction. It implements client-side interpolation. The problem with this is that input delay can be perceived. I've measured the various times ...
2
votes
1answer
54 views

How can I create a copy of an object in Unity?

I'm new to unity. How can I make some copies of my GameObject in Unity by scripting? I have tried this by the way: public GameObject stone_3; void Start () { for (int i = 0; i < 10; i++) ...
2
votes
4answers
422 views

Move ball based on direction of force?

I'm trying to make a ball that will move in the direction I push it from, and later pull it to me based on where the player is standing. using UnityEngine; using System.Collections; public class ...
3
votes
0answers
33 views

Unity Capture And Display Live Camera Feed

I want to display the video using the device camera on specific part of the screen on iOS, android and Editor. I was able to find the WebCamTexture which display the camera video on the Quad (3D ...
1
vote
2answers
43 views

Camera relative movement is pushing into/off the ground instead of parallel

I'm building upon roll a ball tutorial in unity, and I have managed to rotate the camera around the ball just fine with the code below. But there's one problem. In this code, when I add force to the ...
1
vote
2answers
51 views

Counting triangles and vertices in Unity's cube

I want to understand logic behind drawing triangles of primitives in Unity. When we spawn simple cube, variable mesh.vertexCount gives us value 24. Also when we list all vertices positions (from mesh....
1
vote
1answer
24 views

Add Smooth Force to Player Rigidbody

I am trying to add force to player's rigidbody, when the screen is held. I've written following code for that. float PlayerForce=50.0f; void FixedUpdate() { bool PlayerActive = Input.GetButton ("...
1
vote
1answer
182 views

Unity draw part of sprite sheet

Im working in Unity and im finding the animator isnt working for what im trying to do in my 2d game. What I want to do is build a specific animation using sprite sheets, then be able to reuses that ...
1
vote
1answer
37 views

convert clock input into 24 hour format

I have stuck in a logical problem I have a third party package of DayNight. It takes hours input(24-hour-format) to show dayNight effects in scene My code is to transform 12 hours clock cycle into 24 ...
3
votes
3answers
95 views

Unity - hierachy organisational methadology

I'm just getting into unity, so I do not know if this system of organisation will have any negative consequences. I intend to store my project files and assets under an assets directory then into ...
1
vote
0answers
38 views

Position values magically flipping signs

I'm trying to make a 2D sliding puzzle game (like 15 puzzle). My main problem is getting the squares to stop just before they touch. I don't want to use colliders because I'm scared they might pop out ...
1
vote
2answers
35 views

Unity2D - move rigidbody object with collision

How do I move and collide my object (position given by touch or click), by Using rigidBody2D.MovePosition i can only teleport my character, and by using velocity, my character keeps moving, I want him ...