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)

3
votes
1answer
2k 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
893 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
378 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
259 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 ...
9
votes
4answers
8k 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
1k 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
254 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
108 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
393 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
3k 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
1k 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
930 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
464 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
794 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
7k 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.
1
vote
1answer
838 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
488 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
3k 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. ...
2
votes
1answer
315 views

Model a chain with different elements in Unity 3D

I have to model, in unity 3D, a chain that is composed of various elements. some flexible, some rigid. The idea is to realize a human-chain where each person is linked to the other by their hands. ...
3
votes
1answer
876 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 ...
1
vote
0answers
282 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 ...
3
votes
1answer
2k 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 ...
5
votes
1answer
1k views

Lightmapped prefabs for procedural content

I'm doing a game with procedural content from handmade prefabs, but I ran into a problem as Unity bakes the scene instead of objects when lightmapping with Beast. So when the prefabs are instanced ...
2
votes
2answers
793 views

Bloom only on line renderer

How do I apply the Bloom Effect Line Renderer's only? I'm using the bloom effect from the Unity Pro image effects script but it's affecting the way light is rendered to the scene.
2
votes
1answer
424 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 ...
3
votes
1answer
364 views

What's the proper way to set up a texture atlas in Unity 3D?

I am using Unity3d (free) to make a game with user-defined content (i.e., load in a map, it'll build the level for you). Everything is working as expected, except for the rendering. Note the ...
0
votes
1answer
3k 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?
2
votes
1answer
2k 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 ...
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
864 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 ...
1
vote
2answers
947 views

How to create a magic orb like in Skyrim?

How would I go about creating magic orb that looks like from magic menu in Skyrim in Unity3D? Here is what I have in mind: Orb Image And a video of that effect from 0:09-0:13: Orb Video
2
votes
1answer
798 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 ...
3
votes
2answers
3k views

What makes Unity3D games look so similar? [duplicate]

For some reason, I'm quite good at guessing whether or not a game (both 2D and 3D) is made with Unity3D. But I can't really figure out why that is. What makes Unity3D games look similar? Is it ...
-1
votes
1answer
1k views

Matchmaking system in Unity

I was wondering, how would one go about making a matchmaking system in Unity? I've tried some ideas with the Master Server, but it wasn't doing its job right, since thats a lobby based solution. I ...
1
vote
1answer
583 views

How can I avoid false positives with “blow” input?

I’m working on a game which uses blow functionality to move an object in the game screen. This screen also has background music in it. The problem is that the microphone is detecting the BGM as blow ...
5
votes
3answers
1k views

Why is this code producing jittery movement?

I have a new project, all settings default with a simple cube on a plane. Cube is not kinematic but is a rigid body under the effects of gravity. I'm trying to normalize the direction before I ...
3
votes
3answers
13k views

Unity3D Orbit around orbiting object (transform.RotateAround)

The best way to explain this is I'm attempting to make a small model solar system (not to scale or anything complicated, just simple rotation as a learning exercise). There's a sun, a planet, and that ...
1
vote
1answer
576 views

How to check metadata stored in FBX files?

Is there a way to check and edit metadata information stored in FBX files? I'm using 3ds Max's fbx exporter. Can this be done with it or is there any other tool for that? For example: adding name, ...
2
votes
2answers
448 views

Player jitter when positioned at large coordinate values

I am trying to make a simple top down scrolling shooter using Unity3D comprising of the following elements: 1) Top down orthographic camera: points at 65 degrees towards the ground. At a height of ...
-1
votes
2answers
141 views

Velocity deacceleration working incorrectly

Basicly, I've tried to code velocity into my game, which works sort of. The deaccelaration works sort of, but not correctly. The problem is, that the positive values, decreases just fine and dandy to ...
0
votes
1answer
765 views

Creating a light that follows the player

How do I create a point light that follows the player character when they walk around? The light should shine on the player and not on a fixed point.
1
vote
1answer
678 views

VFX for Unity sci-fi game

Can someone please give me any tips/ guides on how to create hologram, disintegration & freeze effects in Unity game? I have a sci-fi shooter game in mind, and I would like to incorporate the ...
0
votes
1answer
3k views

Rotate a 3D object in Unity3D on button click

There is a 3D character in my application developed using Unity3D. Now I want to rotate this 3D character when the user press the rotation button. I tried several ways, but didn't work. How can I ...
3
votes
1answer
741 views

How to smoothly change the target of smooth follow without camera glitch?

I am trying to change the target of the smooth follow at runtime, but there is a glitch in the camera since the targets are different sizes. I tried using lerp and smooth damp both gave the same ...
0
votes
1answer
20k views

Rotate an object smoothly on the Y axis in Unity

I am attempting a simple script to swing a door open in Unity. This requires a smooth rotation of 90 degrees around the Y axis. I have seen that one way to do this is using Unity's Quanternion ...
2
votes
0answers
376 views

Access Android Camera.Parameters from Unity

I would like to access the android defined class Camera.Parameters.getHorizontalViewAngle() from a Unity3D c# script but my java skills are limited. Can anybody offer any help? I have this code: ...
-1
votes
1answer
208 views

2D engine that uses Flash Platform classes? [closed]

I want to develop a 2D game for Android, but, I want to use Flash Platform's framework APIs, ex: Sprite, Shape, Graphics, Bitmap .. etc as I have already wrote my game in AS3 .. Is there a 2D engine ...
2
votes
2answers
2k views

Should I code game logic separately from game engine scripts

I'm developing a game in Unity3d, economic strategy. I wonder if I should code logic inside unity scripts, or write it as an external module/library? By game logic I mean game model, which describe ...
-1
votes
2answers
631 views

Move a player in the opposite direction they are looking

I'm looking to move the player in the opposite direction they are facing with a specified force. Rather than try to explain that better I created an image showing what I mean, I've tried reversing ...