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
2answers
4k 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 ...
1
vote
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
566 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
5k 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
644 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
271 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
739 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
747 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
298 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); } ...
2
votes
1answer
218 views

How can I speed up Unity3D Substance texture generation?

I'm working on an iOS/Android project in Unity3D. We're seeing some incredibly long times for generating substances between testing runs. We can run the game, but once we shut down the playback, Unity ...
-1
votes
1answer
267 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
449 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
747 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
177 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
277 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
8k 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
266 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
136 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 ...
5
votes
3answers
892 views

Started game development no idea of computer graphics. Should I learn tools or concepts? [closed]

I am in 6th semester of my Computer science bachelor degree program, Working as Intern in a start up company. I started game development using AndEngine, things are going good because I have good hold ...
0
votes
2answers
2k views

In Unity, can I make a GameObject within a prefab disabled by default?

If I create a simple object hierarchy in my scene... -ExampleGameObject --Child1 [is active] --Child2 [is not active] ...how can I accurately store this as a prefab? If I drag ExampleGameObject to ...
1
vote
2answers
657 views

Unity gizmos vs. referenced game objects

I'm designing a Unity script that I intend to be highly reusable and as easy as possible to setup within the editor. To this end, a number of properties of this script really need some kind of visual ...
2
votes
2answers
3k views

What's the proper way to use static objects and singletons in Unity?

I have a GameObject in Unity, which I've attached this script to, in order to make it function as a Static Singleton : using UnityEngine; using System.Collections; public class SceneStatics : ...
10
votes
3answers
465 views

How to simulate pressure with particles?

I'm trying to simulate pressure with a collection of spherical particles in a Unity game I'm building. A couple notes about the problem: The goal is to fill a constantly changing 2d space/void with ...
5
votes
1answer
6k views

Angle between two points

I have a character who walks to random points in my room in Unity. The problem is he always faces one direction, I want to write in C# a piece of code that will get the direction the character is ...
0
votes
1answer
472 views

Character rotating around target

I'm using xaitment plugin for Unity as the AI for a demo level but I have a problem. My character is supposed to walk to random points but while it's walking there it's rotating around the point. I ...
1
vote
1answer
1k views

Unity RTS Movement

I am trying Unity out and I want to try and write an RTS. What would be the best way to go about getting the basic, right click to set a destination working within Unity? I know how to get the ...
3
votes
4answers
1k views

2D Platformer - Methods to Implement a Whip Weapon

I hope posting here isn't a faux pax, if it is please feel free to direct me to the correct location. Or, if there is a thread that already covered this I would love to be pointed in its direction. ...
0
votes
3answers
412 views

Parent-Child position mathematics

What is the math theory when a child object moves with the parent transform? I am doing an angle indicator which shows a field of view, which works fantastic when the angle is static. But I cannot ...
3
votes
1answer
2k views

Multi Screen Rendering in Unity

My experience with Unity in not that in depth. But I am wondering if it possible in unity to split what is being rendered across multiple screens. It's hard to explain, so here is an image: So ...
0
votes
2answers
4k views

Enabling and Disabling children in Unity

I'm trying to create an enable/ disable game objects in Unity. I used GameObject.SetActiveRecursively but it only works one-way. I used a collider in which when an object enters the collider. The ...
1
vote
2answers
2k views

Irregular Shaped Colliders For Unity

Is it possible to create an irregular-shaped collider? If so, how? Would I need to create a couple objects and group them up into one Game Object?
5
votes
2answers
3k views

Best algorithm for recursive adjacent tiles?

In my game I have a set of tiles placed in a 2D array marked by their Xs and Zs ([1,1],[1,2], etc). Now, I want a sort of "Paint Bucket" mechanism: Selecting a tile will destroy all adjacent tiles ...
3
votes
1answer
200 views

What's a viable way to get public properties from child objects?

I have a GameObject (RoomOrganizer in the picture below) with a "RoomManager" script, and one or more child objects, each with a 'HasParallelagram' component attached, likeso: I've also got the ...
2
votes
1answer
688 views

Controlling a GameObject from another GameObject's script component

I'm creating a game where when starting the game, a Cube is duplicated GridSize * GridSize times when the game starts. Now, after the cubes are duplicated I want to attach a variable to them, say ...
1
vote
4answers
2k views

Using Lerp to create a hovering effect for a GameObject

I want to have a GameObject that has a "hovering" effect when the mouse is over it. What I'm having trouble with is actually having a color that gradually goes from one color to the next. I'm ...
11
votes
4answers
9k views

Ignore collisions with some objects in certain contexts

I'm making a racing game with cars in Unity. The car has a boost/nitro powerup. While boosting, I wouldn't want to be deviated when colliding with zombies, but I do want to be deviated when colliding ...
0
votes
1answer
704 views

Periodic updates of an object in Unity

I'm trying to make a collider appear every 1 second. But I can't get the code right. I tried enabling the collider in the Update function and putting a yield to make it update every second or so. ...
5
votes
1answer
2k views

Finding if a point is inside of a mesh (Point-in-polyhedron)

How can I find if a point (Vector3) is inside of a mesh? Would this work for both concave and convex objects? I read somewhere that if you raycast in both directions of every axis (X, -X, Y, -Y, Z, ...
0
votes
3answers
1k views

How Would I create alternate players (Turn base Event)

The picture above shows 2 players. Each containing 3 characters. I want to know how to make a Turn based event starting with player 1 alternating turns with player 2. And in every alternation ...
0
votes
1answer
133 views

What is a correct step by step logic of exporting scene with baked occlusion for loading it at runtime?

I wonder what is a correct step by step logic of exporting scene with baked occlusion (Culling data) for loading that scene at runtime (on fly from the internet for example))? So currently my plan ...
18
votes
7answers
12k views

Algorithm for creating spheres?

Does anyone have an algorithm for creating a sphere proceduraly with la amount of latitude lines, lo amount of longitude lines, and a radius of r? I need it to work with Unity, so the vertex positions ...
3
votes
0answers
576 views

Any recommended books/resources on component-based design? [closed]

I come from a background with heavy use of the classical object-oriented paradigm for software development. The company I am a part of switched to Unity not too long ago, and we're all very excited ...
2
votes
2answers
4k views

Drawing a dynamic indicator for a field of view

My goal is to draw a dynamic indicator for a cube, which represents the field of view. The ideal indicator would look the same as in Metal Gear Solid(the blue ones): From what I have gathered, I ...
2
votes
2answers
348 views

How to prioritize related game entity components?

I want to make a game where you have to run over a bunch of zombies with your car. When moving around, the zombies have a few things to take into consideration: When there's no player around they ...
1
vote
1answer
85 views

Assigning a colour to imorted obj. files that are being used as default material

I am having a problem with assigning a colour to the different meshes that I have on one object. The technique that I have used is the first approach on this site. Is it possible to export a ...
-1
votes
1answer
1k views

How to adjust the shooting angle of an object

I've been trying to add an angle adjustment feature to a power bar that I got from unity3dStudents. But I can't seem to get the code right. I'm using addforce to rigidbody, it works but the power is ...
1
vote
1answer
2k views

Unity: Spin wheels to move vehicle

I am just getting started with Unity and I'd like to ask a question. If I have a "Vehicle" object that has two children: "FrontWheel" and "BackWheel" (both 'wheels' are cylinders), how should I set ...