From GameDevWiki | The video game design and development wiki
(Redirected from Engine:Unity3D)
Jump to: navigation, search


Unity3D, sometimes referred to Unity, is both a game engine, and 2D and 3D development suite, created by Unity Technologies in 2005. Games are developed with the Unity3D editor, and are compiled by the editor to use the Unity3D game engine. Unity is an increasingly popular game engine due to its versatile and open nature. Unity itself is not open source, but many programmers and developers will openly share scripts, shaders, and assets with the community that vastly improve the stock assets and capabilities of the engine, which usually aren't meant for consumer consumption.




Unity has a fully featured editor where the user can drag and drop prefabs and objects around in the world, as well as edit their properties. Every individual object has a set of coordinates, scripts and variables that can be set, components such as lights and audio, and more. Pictured is the Unity3D Editor running in Ubuntu Linux. Note the Blacksmith demo running in the Unity editor in realtime, which can be exported and compiled as an executable.



Unity's underlying engine is what is used by both the editor and final compiled executable. Many games used Unity's engine across the board due to its support for cameras, lighting, shaders, networking, and more.


Unity's scripting engine is pretty simple. First, you create a script and give it a name. Second, you attach it to any "game object", whether it's empty or it's your character's foot - it doesn't mind. Third, you drop your code into the predefined skeleton Unity generates for you - by default, it will include some basic libraries and create an empty Update() and Start() method definition, which will respectively execute every frame, and once upon initialization. A simple example of a Unity script would be this:

 1 using UnityEngine;
 2 using System.Collections;
 4 public class MyScriptName : MonoBehaviour
 5 {
 6     void FixedUpdate ()
 7     {
 8         Debug.Log("This is a fixed update. I run every predefined time interval, and am used to interpolate physics objects and other time-sensitive things.");
 9     }
12     void Update ()
13     {
14         Debug.Log("I run every single frame, even if you're running at 2FPS.");
15     }
16 }

   Main article: UnityIntro.cs (script)


  • Live editing - Unity allows you to play and pause your game, and run it right in the editor. Although the performance isn't as good as the final compiled executable, it's more than enough to test features and tweak things.
  • Versatile - Unity can use almost any modern file format for assets, and its popular C# script programming language makes it easy to use lower level OS functionality like file reading and writing, JSON, XML
  • Shader modularity - Shaders can be written from scratch, adding many more options for developers that need control over visual appearance.
  • Asset sharing - Unity's own Asset Store as well as user-made asset packs make it very easy to collaborate and share with teams of all sizes. It also gives developers the opportunity to sell their assets on the store, which some use as their entire business model (no games!).


  • Closed source - The engine itself is not open source unless you buy an enterprise-tier subscription.
  • No nested prefabs - Hard to do "object-oriented" asset creation.

Free assets[edit]

   Main article: Free engine-agnostic art assets

The Unity Asset Store distributes many assets for free, including scripts, models, textures, prefabs, sounds, and more. Unity development is very easy to begin due to the sheer number of tutorials and examples available, many of which can be grabbed right from the integrated asset store.


  • Hold Alt when clicking an entry in the hierarchy to expand/collapse ALL children (can really save you some time)
  • When dealing with Unity UI, use the crosshair image located at the top right and HOLD SHIFT or ALT to ACTUALLY align the position & anchor.
  • When the game is running you can make changes to your game in the editor in real time. If you right click a component you've changed during runtime and select copy, you can stop the game, right click that component in the editor again, and paste the values from runtime all at once.




   Main article: Unity3D Showcase



Notable games[edit]

  • Inside by Playdead Interactive