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)

1
vote
1answer
4k views

Rotate to a set degree then stop Unity [closed]

I'm trying to make an object rotate up on the Y axis 90 degrees, then stop. I've got the rotating up bit working fine, it's getting it to stop once it hits 90. Some of the things I've tried include ...
4
votes
1answer
1k views

Custom shadow mapping in Unity 3D Free Edition

Since real time hard and soft shadows are Unity 3D Pro only features I thought I will learn Cg programming and create my own shadow mapping shader. But after some digging I found that the shadow ...
1
vote
2answers
703 views

How to pass an interface to Java from Unity code?

First, let me say that this is my first experience with Unity, so the answer may be right under my nose. I've also posted this question on Unity's answers site, but plugin questions don't seem to be ...
6
votes
1answer
397 views

Huge 2d pixelized world

I would like to make a game field in a indie-strategic 2d game to be some a-like this popular picture. So every "pixel"(blocks) changes it's color slowly, sometimes a bright color wave happens, etc, ...
11
votes
2answers
1k views

Why are trees shining in background?

Currently I am creating a forest scene in the dark, and the trees are shining far away, but when I get close they are fine. I have the shaders set to "Nature/Tree Soft Occlusion [bark/leaves]", but ...
4
votes
1answer
3k views

C# graph library to be used from Unity3D [closed]

I'm looking for a C# graph library to be used inside Unity3D script. I'm not looking for pathfinding libraries (I know there are good one available). I could consider using a path finding library ...
1
vote
1answer
1k views

Unity: parallel vectors and cross product, how to compare vectors

I read this post explaining a method to understand if the angle between 2 given vectors and the normal to the plane described by them, is clockwise or anticlockwise: public static AngleDir ...
2
votes
1answer
2k views

Unity3d - setting gameobject position by percentage of view

I am having trouble finding a way to set a gameobject's position with regards to the screen size. I am building a 2d game that I will be putting on iPhone, iPad, and Android. I need to be able to set ...
1
vote
0answers
363 views

5.1 sound in Unity3d 3.5

I'm trying to implement 5.1 surround sound in my game. I've set Unity's AudioManager to a default of 5.1 surround and loaded in a 6 channel audio clip that should play a sound in each of the different ...
2
votes
3answers
5k views

Game engine like Unity 3D that allow me to use .NET code

I've been looking at Unity 3D for developing a 3D PC game and I really like the scene editor and how it simplifies the process of constructing 3D scenes, managing assets, animations, transitions etc. ...
1
vote
1answer
698 views

Strange behavior of RigidBody with gravity and impulse applied

I'm doing some experiments trying to figure out how physics works in Unity. I created a cube mesh with a BoxCollider and a RigidBody. The cuve is laying on a mesh plane with a BoxCollider. I'm ...
-1
votes
1answer
544 views

Off center projection

I'm trying to implement the code that was freely given by a very kind developer at the following link: ...
2
votes
1answer
3k views

Understanding Unity3d physics: where is the force applied?

I'm trying to understand which is the right way to apply forces to a RigidBody. I noticed that there are AddForce and AddRelativeForce methods, one applied in world space coordinate system meanwhile ...
1
vote
1answer
1k views

What kind of shader is this?

Cube World uses a pretty good looking shader, I especially like the shading of the characters: Is this soft shading? I'd like to achieve this effect in Unity 3D Free, but since the free version ...
3
votes
1answer
227 views

How can I generate a 3d model via a series of transforms?

Is it possible to generate 3D models using some sort of object transformation (like it's shown here), using PovRay or any other tool, and import them into Blender / Unity? For example starting with a ...
8
votes
2answers
2k views

Unit Testing at Unity3D

How to implement Unit Test at Unity3D. I wonder if it would be possible to extend the Unity editor to have some sort of testing framework in it. Is there any guideline to implement it? EDIT : ...
2
votes
1answer
3k views

Unity custom shaders and z-fighting

I've just readed a chapter of Unity iOS Essential by Robert Wiebe. It shows a solution for handling z-figthing problem occuring while rendering a street on a plane with the same y offset. Basically ...
7
votes
3answers
382 views

Why doesn't light continuous on my model?

I created a basic textured cube model with Blender to practice modeling, and then I imported it into Unity. After I put up some lighting it looks pretty ugly. The light is not continuous on a row of ...
2
votes
1answer
906 views

Unity3D: default parameters in C# script

Accordingly to this thread, it seems that default parameters aren't supported by C# script in Unity3D environment. Declaring an optional parameter in a C# scirpt makes Mono Ide complaint about it: ...
0
votes
1answer
1k views

How to get GameElements (RigidBody) size in Unity

I've made a prefab consisting of a Cube which I've first scaled to more resemble a brick. There's also a Rigidbody added to the cube (in the prefab). Now I want to use that prefab in a c# script to ...
0
votes
1answer
282 views

Control convention for circular movement?

I'm currently doing a kind of training project in Unity (still a beginner). It's supposed to be somewhat like Breakout, but instead of just going left and right I want the paddle to circle around the ...
1
vote
3answers
666 views

Randomly placing items script not working - sometimes items spawn in walls, sometimes items spawn in weird locations

EDIT: I changed some code after getting advice from colleagues. However it still has problems occasionally, though the problems aren't as bad or frequent. Here's the new code I'm actually using: ` ...
2
votes
1answer
405 views

Distributed Rendering in the UDK and Unity

At the moment I'm looking at getting a game engine to run in a CAVE environment. So far, during my research I've seen a lot of people being able to get both Unity and the Unreal engine up and running ...
11
votes
3answers
2k views

The reasons behind Unity3D engine design (game object/transform component)

I'm trying to understand the reasoning behind Unity3D engine design and this is something I can't get my head around yet: why is transform data stored in a separate component, instead of being a part ...
11
votes
1answer
2k views

Rendering Unity across multiple monitors

At the moment I am trying to get unity to run across 2 monitors. I've done some research and know that this is, strictly, possible. There is a workaround where you basically have to fluff your window ...
3
votes
1answer
5k views

Can I use an animated gif as a texture?

I want to have a plane that shows an animated Gif as it's texture, so essentially it will be a movie. Can I apply an animated Gif as a texture? If so, does it apply like a normal texture? Note: I know ...
2
votes
1answer
1k views

2d games unity vs Flash [closed]

do people find unity better than flash for 2d games while unity is 3d engine , or Flash still better because it's made for 2d games and flash can get the job done faster ,and now flash is better for ...
4
votes
1answer
7k views

How to detect collision in Unity3D without rigid bodies?

The target platform of my game is mobile devices therefore I try to develop it performance oriented. It will be a strategy game so I don't really need physics in it, consequently I did not add ...
1
vote
1answer
760 views

Scene graph in Unity3D

I was wondering if any scene graph-like mechanism is implemented into Unity3D? For example if I have a GameObject, can I add child cubes to it so when I rotate the parent GameObject, the siblings will ...
3
votes
2answers
3k views

Where to attach global scripts in Unity?

As far as Iknow in Unity, every script must be attached to an object. But what is the case with global scripts? For example in a tetris-like game to which object should I attach the element spawner ...
2
votes
1answer
3k views

Should I use XNA or Unity to build a video game? [closed]

My friend and I are planning to make a video game (like Slender) where the character is stuck in a building, when lightning strikes, and the lights go out and your objective is to find the back-up ...
0
votes
2answers
551 views

3D Modeling Software for Programmer [closed]

I've recently learned how to make games for Unity3d, and now I want to start making games! I can't wait to start! However, before I can make 3D games, I need to learn 3D modeling for character ...
0
votes
1answer
1k views

Calculate the angle between two 3d vectors: Function always returns 89.1-89.9

I have my own 2d game and I am attempting to calculate the angle between 2 GameObjects. My Problem: My function that is meant to calculate the angle(direction) between 2 Vector3's doesn't appear to ...
4
votes
3answers
4k views

Flick Gesture in Unity3D Android

I'm trying to create a football game where the user will make a flick gesture in order to kick the ball. I'm quite new to developing games in unity3d, I have successfully made a moving ball, added ...
10
votes
5answers
617 views

What file types should I exclude from my game's source control repository?

I have started working on a personal project using Unity with a friend and we've set up our own source control system. I am aware of the fact that there are many types of files, namely those that are ...
4
votes
2answers
1k views

How can I prevent pixel artifacts on programatically generated textures?

In the game I'm developing, rooms can be of various sizes, which means I need to vary the size of the floor texture appropriately. The way I've solved this problem is to generate a Texture2D ...
5
votes
2answers
244 views

Hide individual regions on a territory map

I have a map of adjacent irregularly-shaped territories. It happens to be a county map, but that's not important. In the game, the player only sees a few to start, and as he progresses to new ...
3
votes
1answer
2k views

2D jerky motion with AddForce and physics [closed]

I have a problem smoothly motion - I see jerking when I am using physics and AddForce. It's not a question related to Update or Time.deltaTime - I created simple scene with few lines and sphere. ...
6
votes
1answer
697 views

Creating custom collision map for 2D

I have a 2D level that I have built in my map editor, and I was wondering the best way to create a collision map for it. I have a collision map layer in my map editor, which saves each node (for ...
2
votes
2answers
676 views

Do I have too many colliders on my screen?

I'm running into a situation where my frame rate drops from 70 FPS (on my desktop computer) down to 5 FPS (on my iphone) and I'm trying to understand why. At the moment, I'm only drawing simple ...
1
vote
2answers
284 views

unity3d camera movment problem

when i turn the camera with var tspeed:float=2.0; function Start () { } function Update () { if(Input.GetButtonDown("tleft")){ transform.Rotate(0, tspeed* Time.deltaTime, 0); } ...
1
vote
1answer
174 views

Long delays in Unity3D substance generation

Currently working on an iOS/Android project in Unity3d, and we're seeing some incredibly long times for generating substances between testing runs. We can run the game, but once we shut down the ...
-1
votes
1answer
239 views

Tools need to for low poly model, texture making & lighting in unity3d (iOS) [closed]

I am new to unity3d, i want to create a 3d game i have a team of 3d designers and programmers. My question which software should we use for modelling, texture making and advanced lighting for mobile ...
0
votes
1answer
367 views

How do I prevent dynamic GUI elements from overlapping in Unity?

I'm working on a birds-eye-view for our Unity3D game world, where each point of interest has a label hovering above it. The problem is that sometimes they overlap, although there is more than enough ...
2
votes
1answer
628 views

How to use proximity sensor in android with unity3d?

I want to create a android game with unity3d using proximity sensor an I don't know how to access that sensor with java script
1
vote
0answers
168 views

Virtual World Plaforms and Unity3d

I'm moving in the direction metaverse developing. A few years back I wandered around in Second Life and found it entertaining for a New York minute. Now, I'm set to plunge into the Virtual World/MMO ...
1
vote
0answers
246 views

Mesh deformation maya to unity

I have a model that has been modeled & rigged in Maya, whenever i export it as an FBX and take it into unity it seems to collapse at certain areas (see the attachments for a before and after). The ...
3
votes
3answers
6k views

How do I tell if an object is currently colliding with another object?

I know this sounds simple, but I can't figure out how to tell if a GameObject is currently colliding with another object in Unity. I've looked online, but can't find any tutorials or answers that ...
1
vote
0answers
257 views

unity pathfinding [closed]

I have the navmesh and all set up in my unity project but as is I only know how to give it a target to go to, what I want is for it to randomly walk around my scene any help is greatly appreciated
1
vote
1answer
133 views

1 kb swf file created when building to flash in unity

I am trying to build a project in flash that I have made. It goes through its building process, but when it is done the swf file that it creates is 1 kb in size. I am not sure what I am doing wrong or ...