Unity is a highly cross-platform engine that focuses on easy art pipeline process and uses Mono as its scripting back end.

learn more… | top users | synonyms (1)

0
votes
0answers
244 views

Design virtual resolution for 2D development in Unity

I came to Unity with Cocos2D-X experience in mind. In Cocos2D-X, I can choose a "virtual" screen resolution size to rely on the entire game during development and the game will automatically adapt to ...
2
votes
2answers
835 views

Rotate to a set degree then reverse and repeat in Unity

I'm making my first project in Unity, a simple game where touching objects adds points to the player's score. I'd like the objects to have a pleasant back and forth swaying animation on the Z axis. ...
1
vote
0answers
171 views

With 2 superposed cameras at different depths and switching their culling masks between layers to implement object-selective antialising:

We superposed two cameras, one of which uses AA as post-processing effect (AA filtering is cancelled). The camera with the AA effect has depth 0 and the camera with no effect has depth 1 as can be ...
0
votes
0answers
73 views

“has no motion” warnings

When I reimport my project's Library, I get lots of warnings such as State combat.Ghoul Attack has no motion but I have no idea why. In this specific case, I looked up Ghoul Attack. Here's the ...
3
votes
1answer
124 views

Why am I getting a mirrored mesh out of my data structure?

I'm in the beginning stages of an RTS game in Unity. I have a procedurally generated terrain with a Perlin noise height map, as well as a function to generate a river. The problem is that the ...
1
vote
1answer
323 views

Android Swipe In Unity 3D World with AR [closed]

I am working on an AR application using Unity3D and the Vuforia SDK for Android. The way the application works is a when the designated image(a frame marker in our case) is recognized by the camera, a ...
2
votes
1answer
173 views

how to android touch in Unity?

I am creating simple game for android.I used touchphase.moved to power up my ball and touchphase.ended to throw the ball.But what happened is the ball is thrown when I moved my finger in both x and y ...
0
votes
1answer
2k views

How to opitimize Shadows in Unity 3D

I made the shadow of Solider in my game using Unity pro shadows feature. http://docs.unity3d.com/Documentation/Manual/Shadows.html The performance of my game becomes very slow after adding these ...
-1
votes
1answer
177 views

Unity 2D sprite support? [closed]

Does Unity 3D support 2D sprites yet? I know that they have mentioned it in a blog post but I don't know if that feature has gone live yet
1
vote
0answers
617 views

OnTriggerEnter not called

I am working on a fight game with 3D models but played like a 2D game. So the player characters have swords. The Player GameObject has several body parts that are colider triggers. The sword is a ...
4
votes
1answer
413 views

Polygon count budget

Is there any smart way to think about polygon budget relating to PC gaming today? My game will have one static 3d background scene and two fighters. No more enemies. I am thinking about having ...
1
vote
0answers
185 views

dynamic 2d texture creation in unity from script

I'm coming from HTML5 and I'm used to having the 2D Canvas API I can use to generate textures. Is there anything similar in Unity3D? For example, let's say at runtime I want to render a circle, put 3 ...
2
votes
1answer
1k views

How to get all keys and values of the PlayerPrefs in Unity?

I'm storing player name and scores in the Unity PlayerPrefs. I'd like to list all the names and scores stored in PlayerPrefs and display a high score page: Is it possible to display all the keys ...
0
votes
1answer
186 views

Text resource not loading

I'm trying to load text from a .txt file into a TextAsset variable. The file is in the assets folder under Texts/. My problem is that bindata is returned as null. string instructions; void Start () ...
1
vote
1answer
282 views

Non OnGUI based progress bar

How can I make a progress bar appear in Unity that doesn't make use of the OnGUI functionality in C#? I'm doing something with an Oculus and the OnGUI stuff doesn't work too well in a stereoscopic ...
1
vote
1answer
665 views

How to automatically render all opaque meshes with a specific shader?

I have a specular outline shader that I want to be used on all opaque meshes of the scene whenever a specific camera renders. The shader is working properly when it is manually applied to some ...
7
votes
3answers
370 views

Slerping rotation mirrors

I rotate my game character to watch at the target using the following code: transform.rotation = Quaternion.Slerp(startQuaternion, lookQuaternion, turningNormalizer*turningSpeed/10f) ...
3
votes
1answer
419 views

Animations not accepted in animator

In the official Unity Animator State Machine tutorial video animation clips are dragged out from the assets folder into the animator and dropped. I have a 3D model that i bought online to experiment ...
0
votes
1answer
489 views

Unity GUI not in build, but works fine in editor

I have: GUITexture attached to an object A script that has GUIStyles created for the Textfield and Buttons that are created in OnGUI(). This script is attached to the same object in number 1 3 ...
0
votes
2answers
1k views

How to display a GUI text at run time in unity?

I'd like to display a GUI text at run time in my game for a second, so I want to know if it's possible to add or remove a GUI label to the scene at run time?
0
votes
0answers
814 views

Multiple audio sources on a single gameObject in unity

So, I have an audio system set up wherein I have loaded all my audio clips centrally and play them on demand by passing the requesting audioSource into the sound manager. However, there is a ...
5
votes
1answer
911 views

How do I create a 2.5d parallax effect?

I have a decent background in 3D graphics and programming, but I'm new to game development. I'm currently exploring different possibilities and I really want to make an RPG game. I was thinking about ...
1
vote
2answers
149 views

GameObject in hierarchy needs to know who it belongs to

I have two objects from the same prefab. They have bodies and swords. What good options do i have to check if a sword belongs to player2 or player1? For example when body registers that it has been ...
0
votes
1answer
264 views

Rotating object along bezier curve: not rotating enough?

I tried to follow the instructions from the threads on the forum (Cocos2d rotating sprite while moving with CCBezierBy) with Unity, in order to rotate my object as it moves along a bezier curve. But ...
0
votes
1answer
392 views

Making a new instantiated prefab as a child for existing GameObject

I've been searched about how to make these fruit to move as the basket movement if it collided with it, and I've been found that if I want to perform this I've to let these fruit to be a child to ...
0
votes
1answer
376 views

Unity AddExplosionForce not doing anything

Recently I've started learning Unity3D. I'm working on a game as an exercise in which you control a space ship and have to dodge asteroids. If you feel like it's getting a bit too much you can hit the ...
0
votes
2answers
703 views

OnTrigger not firing consistently

I have a Prefab called Player which has a Body and a Sword. The game uses 2 instances of Player, Player1 and Player2. I use Player1 to strike Player2. This is code on the sword. My hope is that ...
1
vote
1answer
2k views

Jumping with Mecanim synchronization

I am using Unity3D 4.1 for one of my projects. I have a robot character which is always running. I am using mecanim animation system. What I really want:When I press Space bar, the character should ...
1
vote
3answers
2k views

How to Use Text in Unity3d

How Can i Create Text in Unity3D? I Use "3D Text" But Its Always on Top Of Everything! Can You Suggest Anything? I creating a 2D Game So its not Necessarily a 3D Text.. Edit: Because I Building a 2D ...
7
votes
2answers
338 views

Coroutines in series

How would i go about stacking up a series of Coroutine calls that should be executed one after the other? I have tried getting a flashing color effect looping a series of color lerps in a coroutine ...
3
votes
1answer
1k views

How do I make the camera focus on a moving game object with ITween?

I'm trying to write a solar system with Unity3D. Planets are sphere game objects rotating around another sphere game object representing the star. What i want to achieve is let the user click on a ...
0
votes
1answer
226 views

Getting and playing AudioClips by string name

Is there anyway I can get an audioclip by the name it has in the assets folder? Or will I always have to make a reference to it by dragging and dropping the clip on a SoundClip in the inspector?
4
votes
1answer
252 views

Keep cube spinning after fling

So I've been trying to get started with game development for Android using Unity3D. For my first project I've made a simple cube that you can spin using touch. For that I have the following code: ...
1
vote
1answer
142 views

Best practice child and parent script [closed]

What is the best practice coming to wher to place the code in this scenario. I have a gamobject called player. It has lots of child objects. One of them is sword. Like this: Player Body Head ...
8
votes
4answers
3k views

How to change Gravity towards certain object in Unity?

I have two spheres in Unity. One is 1000x in size other is 1x in size. So I want the smaller sphere to be attracted to bigger sphere. So how do I do it. I know that it can be down through gravity ...
0
votes
1answer
707 views

Directional light causes an FPS drop

I have only one object in the scene and it is lit with a directional light. It uses the mobile/diffuse shader. The issue is that on iPhone 4 the FPS drops from ~42FPS to ~11FPS when the directional ...
0
votes
1answer
162 views

Unity Extension method with coroutine

Is it possible to have extension methods that starts coroutines? Id like to have an extension method for the GameObject that checks if itself has a renderer and a material and then lerps the color to ...
2
votes
1answer
100 views

Is it possible to tell Unity3d to ignore part of its hierarchy?

One aspect of the game I'm making is each level is made up of room objects, which contain the sprites, physics objects and so on. When you enter a level the whole level is deserialsed and loaded into ...
0
votes
1answer
273 views

How to code camera for layered map in unity

For a current unity project I need a layered map like in Dwarf Fortress. The game will take place in a 3D city enviroment and the camera should be 'snapped' to layers. So there will be (for example) a ...
1
vote
2answers
2k views

Unity Extending Game Object best practice

What is best practice when wanting to add to GameObject class? I would like all GameObject to be able to change color IF they have a renderer. Ive tried using a helper class that takes a GameObject ...
0
votes
2answers
509 views

Unity Mesh and Collider not aligned on rotation

I have a GameObject with a mesh and a collider. When I rotate the object the mesh and the colider do not act the same way and when the GameObject is rotate 65 degrees on the z axis the mesh and the ...
0
votes
1answer
378 views

Unity Sound effect playing too many times

In the class PlayerControl I have this if (Input.GetKey("space")) { soundManager.PlayBleep(); sword.SetActive(true); } In my soundmanager I have this public ...
0
votes
1answer
653 views

Sound Manager class in Unity

Starting with Unity having had experience of XNA im not sure if the way i want to solve my problem is the correct way. So id like the opinion of more experienced people. I am doing a 2.5D game and ...
-3
votes
1answer
323 views

Does C# affect performance in Unity? [closed]

similar question :How does Unity use C# as a scripting language? In Unity , some functions like Update , run per object , per frame. so , is .Net framework involved at runtime ? could it affect ...
4
votes
1answer
439 views

How do I model a real-world building?

This isn't exactly a game development question, but I am planning on using Unity as my engine and modeling in Maya so I was hoping folks on here might have some experience with this. I want your ...
0
votes
0answers
155 views

Terrain effect animations in Unity

I am trying to find out how can I make terrain effects animations that are possible at any given position. I have though about this and I can't seem to find any ideal solution using the following: a) ...
1
vote
1answer
3k views

Create fog (smoke) on Unity3D?

I'm creating a game where you are inside a boiler room, the problem is I want to create the fog (smoke) to make this more realistic.
0
votes
1answer
378 views

Use light cone/range as a Trigger

I was wondering, in Unity 3D, how I could do something with the Spot Light (Range/cone) as a trigger? Since it would be very interesting to be able to manipulate whats actually in sight of Light ...
5
votes
3answers
275 views

Build a Unity asset bundle on linux?

I'm trying to generate an asset bundle on a remote linux machine and stream the bundle to a running Unity instance. Is it possible to download the same libraries Unity uses and compile on Linux?
0
votes
2answers
917 views

Can GMod/SFM models be converted to Unity GameObjects?

Someone made a suite of GMod/SFM models available for free for people making games and videos in GMod and SFM. These are of type .dmx, .dx80.vtx, .dx90.vtx, .mdl, .phy, .sw.vtx, .vvd, .vmt, and .vtf. ...