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

Can't play animation from script in unity

I'm making a 2D sidescrolling game in Unity, and when the player shoots an obstacle, I want the obstacle animation to play and then destroy itself. I got it to destroy itself, but the animation won't ...
1
vote
0answers
149 views

How can I get shadows to appear correctly when using a custom projection matrix?

EDIT: This has been officially marked as a bug in Unity. If anyone else has this issue, you can vote here for Unity to fix it. As mentioned in this thread, I'm using a custom projection matrix in ...
0
votes
0answers
33 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 ...
4
votes
1answer
466 views

Unity3D [C#]: How do I use a custom inspector to expose an array of polymorphic objects to edit?

[EDIT: based on some feedback, I pruned the example down to the base functionality of the bug we are trying to solve. The description below remains accurate, but the repro has been shortened to: ...
1
vote
1answer
1k views

Unity3D: collider performances on mobile iOS devices

I'm experimenting with Unity3D and colliders. Unfortunately I still don't have Unity Pro version and I can't use the profiler. Consider the following situation: mobile devices (ios, iphone 3GS). an ...
0
votes
1answer
21 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 ...
1
vote
1answer
50 views

Overriding all object inspectors in Unity

How can this be done? I want to add a single label to every component( including non-misbehavior ones ) in the inspector. I've tried: [CustomEditor( typeof( Object ) )] And: [CustomEditor( typeof( ...
1
vote
2answers
172 views

Unity2D: Automatic scaling of camera and sprites

I'm working on a point-and-click adventure game using Unity2D for mobile devices and possible PCs and I'm trying to wrap my head around supporting devices with different screen sizes and aspect ...
5
votes
2answers
74 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. ...
0
votes
1answer
114 views

Raycast Flashing problem

Can anyone tell me what is wrong with me code ? If you can see, whenever the player is in range of the raycast. The enemy turns red. But for some reason. Even when the player has meet the requirement ...
2
votes
3answers
69 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 = ...
1
vote
1answer
161 views

Mesh fading to transparent

I have a 2D Mesh object generated at runtime painted all with uniform color. I want that mesh to have its color fade to transparent color close to the edges. Despite I searched everywhere I could not ...
2
votes
2answers
168 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.
0
votes
1answer
309 views

How do I animate Unity GUIComponents?

I want to transform my GUIWindow from the bottom of the screen to the middle whenever the user presses a button. How can I do this?
0
votes
1answer
21 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
14 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, ...
0
votes
1answer
220 views

Programmatically creating sprite animations in Unity

Some background: I have a set of animated gifs which I've converted to spritesheets, which are then imported into Unity as multiple sprites. The end result is that each spritesheet in the Unity editor ...
2
votes
1answer
64 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 ...
1
vote
1answer
285 views

Export Spriter animations to Unity

I want to use bone animations in my 2D game for Unity (5.0 beta). I am trying Spriter. Apparently, it has no official Unity support. There was some guy, back in 2014, who posted a plugin to convert ...
2
votes
1answer
63 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 ...
2
votes
1answer
488 views

How to translate swipe gestures into rotations?

I am making a snake game. I want to rotate my snake in the direction specified by swiping on the screen, the directions are limited to orthogonals (90 degree increments). It's an android game. Can ...
0
votes
0answers
13 views

Access different vertices of a Mecanim Unity 3d

I have a human mesh connected with an fbx animation file using Humanoid Mecanim. What I want to do is how to know the vertex groups, meaning the group of different vertices assigned to different ...
0
votes
1answer
21 views

Making a multiplayer game on unity [on hold]

I've made a game with friends on XNA and I wanna do it in unity. I'm starting to learn it for now, made a spritesheet and did some basic movement animations. Can u suggest some site or a detailed ...
3
votes
2answers
39 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 ...
1
vote
1answer
43 views

Level Data with JSON [on hold]

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}, ...
4
votes
3answers
657 views

Determining which edge of a box was clicked in Unity

How would I go about figuring out which edge of a box is clicked in Unity? Quick image I created, colored in boxes represent edges on a face I would like to check for. The current solution I have ...
-1
votes
0answers
22 views

How do i make a load level method that if you touch a object you move to a different level in unity [on hold]

public void OnTriggerEnter2D(Collider2D collisionObject) { if (collisionObject.gameObject.tag == "h") { Application.LoadLevel ("h12"); } }
0
votes
1answer
133 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 ...
0
votes
1answer
114 views

How to import animations from one model to others

I have two models (one animation in each) which I got for free from Mixamo. I imported them in Unity and they look like this: http://imgur.com/atjQbkI Justin@Idle and Justin@Walking. As can be seen ...
0
votes
1answer
61 views

GUI.Box z-index for mouseover

So I am drawing an inventory with slots like so: private void DrawItemSlotAndAttachActions(Item currentItem, Rect slotRectangle, Event e, int itemSlotPosition) { if (!(currentItem is ...
1
vote
1answer
41 views

Unity Inspector Not Showing Serialized Variables Of Child

So I'm new to using Serialaiziblewtfever(I just cannot remember the correct spelling). In the Unity editor it works fine if I have something like: [System.Seriliabizblewtfever] Public class ...
1
vote
2answers
54 views

unity3d - Object keeps falling down

I have an object that moves towards another object using this line : transform.position = Vector3.MoveTowards(transform.position, target.transform.position, speed * Time.deltaTime); this is it's ...
0
votes
2answers
297 views

How to stop objects pushing each other away on collision?

I'm creating something along the lines of Super Smash Brothers. There's a problem with the collision between the two players and projectiles. We have rigid body on the characters and projectiles and ...
-1
votes
0answers
45 views

how to do scratch card effect in new UI of Unity3D

I would like to know how can we do scratch card like effect in new unity UI's Image tag? Is it possible?,something like this EDIT What I basically want to do is, when user touch/drag on anypart of ...
0
votes
1answer
91 views

How do I make this block go back to the left with another click?

This is the script I've written so far which makes the block move from the left of the screen to the right on a mouse click. What I want to achieve is for the block to move back to the left when I ...
2
votes
2answers
57 views

Unity3D: Efficiently loading chunks in an infinite voxel engine

I'm developing a voxel engine in C# using Unity and I'm currently trying to implement infinite terrain, so I took a look at other Unity voxel engines that have infinite terrain. I've seen three ...
0
votes
1answer
31 views

How do I have a player also be a server? [Unity 2d]

I'm trying to make a game in Unity 2D, and I need a player to be a host because I can't afford dedicated hosting. Each client will have files that the server (and other clients) need to be able to ...
0
votes
0answers
14 views

A panel to change 3d object properties when right click on it (Unity)

I'm building a UI system to edit selected 3D objects. I have spheres on the screen and I want to be able to edit their proprieties (radius for example). In order to do that I want the user to be able ...
0
votes
2answers
87 views

I can't add script in unity

I'm a beginner in unity so I got this problem. Here is the script: using UnityEngine; using System.Collections; public class Playercontrol: MonoBehaviour { public float maxspeed = 10f; bool ...
1
vote
1answer
36 views

How could I get composite rigid body into unity

I am developing a game, in unity, that has accurate destruction physics and from my understanding unity uses plain old rigid body physics. I was wondering if there was a way to bring composite rigid ...
0
votes
2answers
54 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
votes
1answer
18 views

Unable to animate sprite renderer

Why am I unable to add any of the sprite renderer's properties? How can I do it? On all the other properties like transform and so on, when I open them I have a + indicator in the right if I want to ...
0
votes
2answers
53 views

using an int to control events

Let me explain -- I'm just looking for a way that I can link a number to a set of methods. I want to randomly generate a "difficulty" int, and pick out an event based on the number I get. IE, if I get ...
0
votes
1answer
55 views

Comparing two strings in Unity C# [on hold]

I am trying to compare two strings in C# but even though I print the strings and they are the same, the check always fails. Only one is stored in a variable and the other is hardcoded. I tried using ...
2
votes
1answer
79 views

Which is the better way to distribute server workload for MMO server?

I'm making a server for MMO in Unity, which implies that I'll have a big world, split into maps which will be on different servers (to distribute the workload), managed by one master server. Now I ...
0
votes
0answers
50 views

Room game type logic [on hold]

I have started creating a FPS game(nothing serious), now i am facing another issue. Each can create a room(server side), server controlles AI, bullet physics and just about everything. The problem i ...
0
votes
1answer
100 views

StartCoroutine inside TriggerOnEnter2D isn't working

I am new to this, but I need help with a CSharp script. I need to collide with the desired object, pass the game to be 1.6 in TimeScale. After passing 8 seconds in the game, change back to 1 ...
0
votes
0answers
36 views

Unity3D - How to make partially selected EditorGUI.Toggle?

I have nested group of toggles created with EditorGUILayout.ToggleLeft(). I want to change state of the parent toggle to partial check if child toggles have mixed states, like here: But ...
0
votes
0answers
10 views

external camera did not recognize marker in metaio

I have one problem here.I'm using metaio sdk in unity and i want to use external camera to detect marker.but my problem is, the external camera cannot recognise marker.when i switch back to internal ...
0
votes
2answers
97 views

How could you create an SSX style snow trail in unity3d?

So it SSX (a snowboarding game) when you are snowboarding you leave behind a dents in the snow(like a trail) .It's like how if you take a step in the snow you will leave a footprint behind but with a ...