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
0answers
10 views

How to check strings from multiple lines in one input field?

I need help with input fields. I already set the line type to 'Multi_Line NewLine' in inspector, but I have problem with submitting the string. Here's the code: using UnityEngine; using ...
1
vote
1answer
26 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 ...
0
votes
0answers
22 views

Unity Mask shows black content

So I've built my scroll rect, like this reference tells me to do : http://docs.unity3d.com/Manual/script-ScrollRect.html -> Scroll View (Rect Transform with scroll rect attached) ---> Viewport ...
4
votes
1answer
53 views

How can I get Unity to tell me the battery status of my OS X laptop?

How do I get battery status on an OS X laptop in Unity? This is un-Googlable: I keep finding either mobile stuff (iOS or Android) or people complaining about laptop battery life.
0
votes
0answers
17 views

Two game object efficient and fast on-off switch

I have two game-object, on GUI button click i am toggle between them but the problem is one game-object which is small contains less vertx etc., is loading fast while the other which heavy taking ...
1
vote
1answer
15 views

Making Basic Touch Behaviors

I am trying to make Basic Touch behaviors for my game where i want to Pan Camera by Single finger touch. Zoom Camera by pinch With two fingers ofCourse. Rotate Camera by two fingers rotation. Rotate ...
1
vote
1answer
126 views

Using .svg in unity(2D)

Creating resolution independent sprites is tough and memory consuming. How can .svg assets be used in unity for any kind of 2d game? What are alternatives to .svg that can be used in unity? Can ...
4
votes
1answer
63 views

What are these odd distortions on far away textures?

I'm currently writing a simple voxel engine just to get some practice in, and I'm coming across some odd issues. In order to generate terrain, I create a mesh and then assign UV coordinates on a ...
1
vote
1answer
64 views

How to rotate camera counterclockwise around player?

Holder contains camera and rotates around player Camera looks like in diablo, titan quest, grim dawn, etc I cant rotate camera to negative angle values My code: public void ChangeRotation(float ...
1
vote
2answers
98 views

Keep gravity velocity the same all the time

I have 2D rigidbodies that fall to the ground, however they speed up while falling. Also, when they freeze in the air and then unfreeze, the velocity is set to 0 and they gradually start speeding up ...
0
votes
1answer
13 views

How Do I Play An AnimationClip

I want to play an animation but it seems that in The new version of unity it is harder. I have an AnimationClip but I don't know how to play it. I have been looking at this for 2 hrs now and i cant ...
2
votes
1answer
68 views

Make a light only affect one object

I'm wondering if it's possible to make a light source only affect one object? I know that it's possible to use layers and culling mask, but then I would need one layer for every single object which is ...
0
votes
0answers
22 views

Quickly Converting RenderTexture to Texture2D in Unity3D

I have a screenshot preview at the end of the game's level. When I am loading the screenshot, it makes the game freeze for a moment. What may I do so there would be no freeze when I am loading that ...
0
votes
0answers
13 views

What is the best way to animate a jumping motion in Unity 3D?

I am creating a a simple 3D game in Unity with a character who runs, walks, jumps, swims, shoots etc. I am pretty satisfied with my results in all the motions except jump. I need to know at what ...
2
votes
1answer
203 views

Changing scene while joinin room and RPC buffer problem

I have a button to create and join a random room in my main menu. After the client joins (or creates and joins) a random room, i change the scene to game(main) scene in "OnJoinedRoom" function. It ...
1
vote
1answer
52 views

How Do I Play An Animation In Unity 5.3.4?

I am confused on how to play an animation with the new unity version because the flag "Automatically Play Animation" is gone. I cant have the animation connected to my GameObject because it plays ...
1
vote
1answer
260 views

Trying to get reference to Button in Javascript Unity3d

I've this simple script in Unity3d: #pragma strict public var topLeft : UnityEngine.UI.Button; public var topCenter : UnityEngine.UI.Button; public var topRight : UnityEngine.UI.Button; public var ...
0
votes
1answer
24 views

Make a person walk faster when standing on plane/panel in Unity?

Is it possible to make a person walk faster when standing on plane/panel in Unity without writing a lot of code? If so how? I am using the standard asset first person movement prefab.
-3
votes
2answers
251 views

Random AI Movement

So I'm creating a zombie game where the zombies are passive and just walk randomly all over the area when player is not near. My question is: how would I make zombies move randomly? I code in C#. ...
2
votes
0answers
11 views

Automatic audio segmentation and find the most energetic segments

What algorithm can be used for audio segmentation? I want to divide song to segments and find the most energetic segments (begin and end in seconds). It is needed for the rhythm-game. Examples: ...
2
votes
0answers
35 views

Optimise Gear-VR text rendering with Unity

I have a problem with my text being always kind of broken, so there are just some parts of the text visible (parts of letters) and the text flickers a lot. At the moment I have this text 2D-UI text ...
1
vote
1answer
83 views

Character stuck on box collider 2.5D

I'm having trouble with my character on a 2.5D platformer. The character get stuck if it collides without reaching the platform's top. Here is a gif showing it: http://i.imgur.com/jmZ6O1K.gifv Both ...
1
vote
3answers
83 views

How can I disallow the changing of a parent?

I want to disable transform.SetParent(Transform) for a particular GameObject. I am not sure where to start, so it is really difficult to show what I have tried. Is this even possible?
4
votes
1answer
75 views

Unity 5: Use Network Simulator, should I?

I am looking to test intelligent prioritisation of a client server game. In my scenario, two clients are connected to the server. I want one client to have a good connection to the server while the ...
3
votes
2answers
153 views

Develop a Wii U game without official dev kit

I was looking for unity for Wii U game development. But it seems that I need the approval of Nintendo to have the software (and special hardware) (ref: https://wiiu-developers.nintendo.com). Is there ...
0
votes
1answer
60 views

Unity equivalent to cocos2D (and Sprite Kit) Actions?

Does Unity have an equivalent to the Actions feature/functionality of cocos2D and Sprite Kit; if so, what is it? cocos2D Actions: http://python.cocos2d.org/doc/programming_guide/actions.html ...
2
votes
1answer
183 views

An invisible object that deletes anything behind it?

I am using augmented reality to put a 3D object on top of a "camera detected" object. The 3D object can be though of as leaves that go above the real world object but also fall in front / behind / on ...
3
votes
1answer
47 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 ...
0
votes
3answers
271 views

How to access multiple 2DTexture which is assigned in Unity3D inspector panel created by an array in C#?

I am making a puzzle game, i made 5X5 cube, lets take example of orange. very left column is orange, upper with orange dot is static and lower with orange dot is also static. inbetween there are 3 ...
1
vote
1answer
324 views

Questions about scaling in a 2d game in unity

Okay, so: I am making an android game. I want everything to scale to the size of the screen I'm using. Further, my static background needs to scale (as well as every other object), but if the aspect ...
0
votes
1answer
37 views

the tree couldn't be instanced because the prefab contains no valid mesh renderer

I am beginner in unity and i imported a package tree from website and when i add a tree from the package then it show me that the tree couldn't be instanced because the prefab contains no valid mesh ...
3
votes
1answer
24 views

How can I add a new item to my enum list in the inspector?

I have a list of enums. I want to add a new item to it without scripting to make them more easily modifiable for game designers. I made an inventory system and I want to define the type of an item. ...
35
votes
13answers
34k views

How do you handle aspect ratio differences with Unity 2D?

I've gotten a lot of answers to this question, but they are all generic and generally not very useful. None of the tutorials talk about aspect ratio and dealing with mobile devices and there are a ...
2
votes
1answer
247 views

Handling touch input with Event Trigger

I wrote a simple script to control my 'Player' object: using UnityEngine; using System.Collections; public class PlayerMovement : MonoBehaviour { public float jumpVelocity = 10; ...
2
votes
2answers
237 views

Move collider along with model with Mecanim jump animation

I've been creating an infinite runner game in Unity3D for a while and I got stuck in this point that whenever my character jumps using Mecanim system his model (mesh) goes to air but his attached ...
4
votes
3answers
180 views

Can I use two Collision Boxes on the same GameObject?

I have two Collision Boxes on the same GameObject. I don't want the Collision Boxes to be triggers. I want the Collision Boxes on the actual GameObject, not its children. For example, if I want to ...
4
votes
2answers
1k views

How to mirror flip animation curves in Unity?

I have a animation that moves my camera from left to right. Now I'd like to copy it with 'mirror' transformation so I can use it to move from right to left. Is it possible to do it using script or ...
0
votes
1answer
2k views

Unity-Animation parameters are not being set

I have the following animation controller: with two parameters of walkingSpeed and Jump. I have the following code which should change the values: animator.SetFloat("walkingSpeed",0.9f); ...
0
votes
1answer
650 views

Game object position issue in unity3d

I have a set of objects placed on the same layer where all the objects are invisible except one. When I drag an object into a selected area, the current dragged object gets destroyed, and the object ...
4
votes
1answer
613 views

Fixing text on the screen for Oculus Rift

I would like to fix text to the screen for an Oculus Rift in Unity. The text should say something like "get comfortable and then press any key". It seems like OVRGUI.StereoBox should work for this and ...
0
votes
1answer
14 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 ...
1
vote
2answers
70 views

Help with Javascript touch button

I tried many buttons but I can't connect them with the (Java)Script. So I made 2 gui buttons: one for jump which was easy because I have an if statement and if it's true then jump. But I have ...
3
votes
1answer
49 views

How do I change a value gradually over time?

I'm using Unity3D 5-point-something, and I'm planning on making a game where the player travels through a hot, dry desert, and so the heat causes the player's energy to deplete. The object of the ...
3
votes
1answer
205 views

Creating Scenes Programmatically From A Deployed Build in Unity

This is somewhat of an extension to this question: http://answers.unity3d.com/questions/513801/programatically-creating-entire-unity-games.html I have a client who would like to create an entire game ...
0
votes
1answer
105 views

Poker Game Multiplayer network logic

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
1answer
110 views

In Unity, How to format Old RPCs into new “PunRPCs”

In older unity versions you could simply used RPC. With newer verisons of Unity my code now doesn't work and it says that it needs to be transformed into "PunRPC" , Pun being "Photon Unity ...
0
votes
1answer
23 views

Creating 3D gravity in zero-G tied to mass in unity with c#

As a total beginner, I've been working on a patch-job script for a gravity mechanic in an open space sim, I want to derive all my objects from this "Block ALPHA" object and its' set of variable ...
1
vote
2answers
2k views

Simple heart container script for 2D game (Unity)?

I'm attempting to create a simple mobile game (C#) that involves a simple three-heart life system. After searching for hours online, many of the solutions use OnGUI (which is apparently horrible for ...
0
votes
1answer
31 views

Unity move canvas slightly with smartphone acceleration

I'm developing an AR-App with the Samsung-GearVR. To get a smooth UI, I thought about creating a UI, which is not completely fix, I thought it could be nice, when the UI is slightly behind my head ...
3
votes
1answer
133 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 ...