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

Unity3D - Change player input axes on trigger

Hope someone can help me with this, it seems like it should be a simple problem but that only makes it more frustrating! I have a simple game where you roll a ball around by applying force to the ...
0
votes
0answers
34 views

Is resource management a good idea when dealing with animations?

New to the Unity environment here and I have a question concerning how to efficiently manage computer resources in a top down 2D game. I have a large area that looks like a 2d rpg from the 90's and ...
0
votes
1answer
39 views

Rotation with respect to world instead of the object itself using Quaternion.Euler in unity

[Other answers on similar questions on stackexchange didnt help] This script is giving some weird outputs On running this script If I press rightarrow once followed by 's' the object rotates on 'z' ...
0
votes
0answers
35 views

Is there any way to bring animation into unity without a rig/bones?

I am developing for mobile and to make the game run on lower spec mobiles, I was only going to import bones/rig for the main character. There are other humanoid characters in the scene which do move ...
0
votes
2answers
195 views

Grenade throw logic

My case is: We are developing a kart racing game, and the players are fighting with each other and trying to reach the finish line. The thing is, I am confused over how to implement following logic: ...
0
votes
1answer
32 views

Unity - Missing Render Setting from Edit menu

Where I can select Render Setting from Edit menu from Unity5? It looks missing. It suppose to be like this one. Please advice. Thank you.
1
vote
1answer
80 views

Get mouse/touch position for NGUI event

Since I am using NGUI, to capture mouse events I use their methods such as void OnPress (bool isDown) { } How can I check the mouse/touch position that corresponds to this particular OnPress ...
0
votes
2answers
44 views

How can you have the Input Manager Axis values snap to 1 (or -1)?

When a selected key is pressed in Unity, the Input Manager's Input.GetAxis("Horizontal") function returns a gradually increasing number up to 1 (or negatively -1) for the length it is held down. The ...
2
votes
1answer
117 views

Blur effect on background to make the forground more clear unity

I'm making a game in unity and I'm trying to add a background blur effect to my game to make things a bit more clear. Here is an example of what I am looking to do: I'm trying to get the background ...
0
votes
0answers
64 views

How can I detect collision between two objects

I have some code that when I click on an object with my mouse it will change it to another object. I'm using this code to change an object into a shattered version I made of it for destruction ...
2
votes
1answer
86 views

How can I get the user altitude from an iPhone using Unity 3D?

I can see in the Unity 3D documentation that its possible to get the altitude of the user from their iPhone, but I cannot figure out how to actually do it. I try this code: using UnityEngine; using ...
1
vote
0answers
29 views

How to read the binary file generated by the Unity profiler?

I'd like to know how can I read the binary file generated by profiling Unity game and how can I save it on external hard disk.
0
votes
2answers
170 views

Rotate an object smoothly by 90 degrees on key press in unity3D

[I saw few similar question on stackexchange but none is solving the purpose.] I want to rotate a 3D object by 90 degrees on different axis on respective inputs. For example if 'a' is pressed, the ...
0
votes
0answers
24 views

How to scroll Select objects in the hierarchy tab?

So I am creating breakable objects in unity and I have to select around 200 objects in the hierarchy tab so that I can apply some components to each the pieces. My problem is that once I select more ...
1
vote
1answer
66 views

Efficient way to store information about neighbour chunks

I've finally managed to implement an infinite chunk loading system for my voxel engine. Since every chunk needs to have information about the border of the neighbouring chunks, I need to access them ...
1
vote
1answer
86 views

In Unity, how do I render a chromatic aberration effect?

I'd like to replicate the effect used in Teleglitch: In this scene, an object is rendered more than once at different position with different color. This game uses this shader effect to create ...
0
votes
2answers
30 views

UnityEngine.PlayerPrefs corrupts string?

I need to use PlayerPrefs to store arrays of bytes for my game. For some reason, the string I save with PlayerPrefs doesn't come out with the same length. I.e. byte[] TestArray = new byte[256]; for ...
0
votes
0answers
24 views

unity Rigidbody jump

I absolutely don't know what is the problem with this code and I have tried everything without any success. I need help. void FixedUpdate() { if (Physics.Raycast(transform.localPosition+new ...
-1
votes
1answer
26 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) { ...
0
votes
0answers
23 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 ...
2
votes
1answer
78 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
26 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
26 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
1answer
38 views

Unity UI vanishes when the camera Z exceeds 1000

We are developing 3D racing game. After the player's position in Z axis reaches 1000, our Canvas UI is hidden and reset. If I unparent it from Character controller, it still gets auto reset but not ...
0
votes
2answers
47 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
1answer
20 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
1answer
41 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 ...
0
votes
2answers
41 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
4answers
588 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
vote
1answer
40 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
2answers
50 views

Color submeshes in unity3d

I have a main_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). ...
0
votes
2answers
31 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
0answers
21 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 ...
0
votes
2answers
60 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 ...
1
vote
0answers
38 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 ...
0
votes
1answer
48 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
86 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
2answers
33 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.
0
votes
1answer
42 views

How to Render and Blend Multiple Frames to a Buffer in Unity?

I was wondering if anyone knew how to render multiple frames from a camera or texture to a buffer in Unity and to then blend them together? Is this possible? If so how would I go about doing so in ...
0
votes
1answer
76 views

UnityException: Unable to install APK! Installation failed. See the Console for details

I got this error message when trying to build and run on Android actual device. UnityException: Unable to install APK! Installation failed. See the Console for details. ...
2
votes
1answer
64 views

Unity - Main manifest has <uses-sdk android:minSdkVersion='9'> but library uses minSdkVersion='17'

I got this error message when trying to build and run for Android. Error: [Temp/StagingArea/AndroidManifest-main.xml:22, ...
2
votes
1answer
147 views

What is a good way to code dialogue creation?

I'm thinking of making a single method/class/something that will handle my dialogue in the game. AKA, something like: Main text: Choice 1 Choice 2 So I want a method that will able to put ...
2
votes
1answer
88 views

What is an acceptable receive rate for a client?

I've noticed that syncing a transform( in Unity, so a Vector3, and a Quaternion ) ends up being close to 1000 byes per second received on a client( send rate of 20hz ). Multiply this by a generous 20 ...
4
votes
4answers
169 views

What are the differences between using “GetComponent<Transform>()” and this.transform?

I've been reading some example codes and working on my own stuff in Unity. I've been seeing a lot of GetComponent, and often this will be done for the transform: Transform _transform = ...
0
votes
1answer
51 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
0answers
47 views

Solution for GIT commits in Visual Studio while Unity is open?

Specifications -VS 2013 Pro (Linked with Unity) -Unity 4.6.1 -Git Version Control (Linked with Visual Studio 2013) Summary After much research, I haven't found any solutions to this fix. *While ...
1
vote
1answer
63 views

Level Data with JSON [closed]

I am doing level data for a game in Unity with C# I have it in my game as int[,] data = { {0,1,1,0,0,0,1,1,0}, {1,1,1,1,1,1,1,1,1}, {1,1,1,1,1,1,1,1,1}, ...
2
votes
2answers
196 views

How to apply a script to multiple Objects in Unity?

In Unity, I've almost 200 or more objects. I wish to apply single script to all those objects. I'm a beginner & learning scripts in Unity. Edit: At the time of editing the scene itself.
3
votes
2answers
53 views

Unity Change Sceneview to camera view

On selecting camera, I get the camera preview. In Unity, while editing the scene, I wish to switch in such a perspective view that is exactly visible by the main camera. Is there a short cut to ...
6
votes
2answers
117 views

Object Composition in the Unity Editor

I'm trying to learn how to use Unity for my class composition, and I was wondering if you could help me. I'm trying to create a simple game where the player is trying to pop a bunch of balloons. ...