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)

1
vote
1answer
454 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
193 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 ...
-1
votes
1answer
184 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
785 views

OnTriggerEnter not called [on hold]

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
652 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 ...
5
votes
1answer
1k views

How do I set up in-app purchasing in iOS?

I am using Unity and I developing an app for iOS. How do I implement in-app purchases that work world-wide?
7
votes
3answers
393 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) ...
1
vote
0answers
221 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
2k 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
344 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
1k 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 ...
0
votes
1answer
699 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?
5
votes
1answer
1k 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 ...
0
votes
0answers
1k 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 ...
0
votes
1answer
563 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 ...
2
votes
1answer
1k views

Using Bluetooth in a Unity3D Game

Apart from using a plug in or other third party device, is there anyway Unity can support bluetooth communication between two devices? All of the links I have found seem to relate to third party ...
1
vote
2answers
164 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 ...
1
vote
3answers
3k 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 ...
0
votes
1answer
370 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 ...
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 ...
0
votes
1answer
467 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?
0
votes
2answers
1k 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 ...
0
votes
1answer
532 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 ...
7
votes
2answers
466 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 ...
1
vote
1answer
190 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 ...
0
votes
1answer
952 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
193 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 ...
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
1answer
334 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 ...
2
votes
1answer
103 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
597 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
1k 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
379 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
574 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 ...
1
vote
1answer
5k 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
548 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 ...
4
votes
1answer
2k views

How to make a iOS plugin for Unity3d

I've passed last 2 days reading articles and book for understand how can i make a plugin for iOS in Unity. Basically i need just a demo for understand how it work. For now i've tried to make this ...
1
vote
0answers
644 views

How to set up bloom in Unity

Last time I used image effects in Unity it was back when 3.0 was released and for bloom you used the object's alpha to indicate whether it should glow or not. Now in 4.2 I couldn't grasp how to apply ...
2
votes
1answer
546 views

Profiling the GPU of a tablet

We are working on a tablet game in Unity Pro (for the first time). Unity's profiler works great for probing the CPU, but the tablet's GPU isn't supported in the profiler, so we have no idea where the ...
1
vote
2answers
2k views

How do you make the first person object the main camera?

How can a first person object character be made to be the primary viewing camera in unityscript? Do I remove the main camera? or just turn one or the other on/off?
3
votes
5answers
7k views

Parse/Write JSON with Unity iOS

anybody know a tutorial or maybe can help me to develop a parser/reader for JSON compatible with Unity iOS pro? I've already tried different third part libraries but without luck (i've tried json.net, ...
-2
votes
1answer
2k views

How can I import a Google Sketchup model with textures?

I'm using Unity 4 and trying to import a SketchUp Model into Unity and other Engines - but I can't get it to import correctly. Can anyone help me out?
0
votes
2answers
2k views

Type Object does not support slicing Unity3D

I am getting the following error in my code and I can't seem to understand why. Can anyone help me with it? This is my current code. The line causing the error is marked in a comment near the end. ...
0
votes
3answers
2k views

Parent variable inheritance methods Unity3D/C#

I'm creating a system where there is a base "Hero" class and each hero inherits from that with their own stats and abilities. What I'm wondering is, how could I call a variable from one of the child ...
2
votes
1answer
1k views

Automated Unity iOS command line build on Mac

I am doing the iOS builds for a group of Unity (Unity3d) game developers. After pulling the latest git updates, I start up the Unity editor on my Mac and choose "Build Settings", select the iOS ...
1
vote
0answers
221 views

Unity Pro - Shadow rendering issue

I am using Unity Pro 4.2.1f4 and I always have this sort of glitch. This is due to the shadows and the bias. Even with a low bias this is happening. I've found a thread that talks about that ...
2
votes
1answer
356 views

Unity3d reading profiler binary information

So I'm using Unity's profiler to help debug some of my code in the standalone. I've got it running smoothly, and writing all it's data to a .data file which I can read. However, the binary file Unity ...
11
votes
1answer
1k views

How to implement a shotgun in a game?

Pistols and machine guns are easy - you can just have bullets flying in a certain direction, so I already implemented that. A shotgun, on the other hand, does damage to anything in a certain area that ...
0
votes
1answer
687 views

View Matrix from Camera in Unity Script

I am looking to get a Camera component's "view" matrix in a script. I see that I can get the projection matrix using Camera.projectionMatrix, but I don't see a Camera.viewMatrix property... I want ...