Unity · game engine

On this page 7

Unity is a cross-platform game engine developed by Unity Technologies that combines a visual editor, a real-time renderer, physics, audio and animation systems with scripting in the C# language. Among game engines in gaming, it is one of the two most widely used general-purpose engines, together with Unreal Engine, and it is especially common in mobile games, independent productions, 2D titles and virtual or augmented reality.

First released in 2005, Unity built its reputation on accessibility: a free entry tier, a gentle learning curve and the ability to build one project for many platforms, including Windows, macOS, Linux, iOS, Android, the major consoles, web browsers and XR headsets. Not to be confused with the design principle of unity, which concerns visual harmony rather than software.

How the Unity game engine is structured

A Unity project is organized into scenes, which contain GameObjects. A GameObject is an empty container that gains behavior through attached components, such as a mesh renderer, a collider, a light, an audio source or a custom C# script. This component-based design lets developers assemble complex objects from small, reusable parts.

Reusable objects are saved as prefabs, templates that can be placed many times and updated in one place. Scripts typically derive from the MonoBehaviour class and respond to engine callbacks such as Start and Update, which the engine calls as part of its game loop every frame.

The Unity Editor ties these parts together. It shows the scene view for placing objects, a hierarchy of everything in the scene, an inspector for editing component values and a play mode that runs the game inside the editor. Because changes can be tested immediately, designers and artists can adjust levels and parameters without waiting for a full build, which is one of the main reasons for the engine’s popularity in small teams.

ElementRoleExample
SceneA level, menu or self-contained spaceMain menu, forest level
GameObjectContainer for everything in a scenePlayer, camera, door
ComponentAdds data or behavior to a GameObjectRigidbody, collider, script
PrefabReusable template of configured objectsEnemy type placed many times
AssetImported file used by the projectModel, texture, sound, animation
Core building blocks of a Unity project

Rendering pipelines and core technologies

Unity offers a choice of render pipelines, which define how the engine draws a frame. The choice is made early in a project because switching later requires converting materials and shaders. Both modern pipelines are built on the Scriptable Render Pipeline framework, which allows studios to customize rendering in C#.

PipelineTargetTypical use
Universal Render Pipeline (URP)Broad hardware from phones to consolesMobile, 2D, stylized and cross-platform games
High Definition Render Pipeline (HDRP)High-end PCs and current consolesRealistic lighting and visuals
Built-in pipelineLegacy projectsOlder projects and existing tutorials
Unity render pipelines

Beyond rendering, Unity provides 3D physics based on NVIDIA PhysX, a separate 2D physics system, an animation system with state machines, the Shader Graph visual shader editor and UI frameworks. For performance-critical code, the Data-Oriented Technology Stack (DOTS) offers an entity component system, the Burst compiler and a job system for multithreading.

Scripts can run on the Mono runtime or be converted to C++ by IL2CPP for better performance and for platforms such as iOS and consoles that do not allow just-in-time compilation.

Unity compared with other game engines

The engine landscape offers several strong options, and the right one depends on project type, team skills and target platforms. The comparison below summarizes the main differences between Unity and its closest alternatives.

EngineMain languageTypical strengthsLicensing model
UnityC#Mobile, 2D, XR, broad platformsFree tier, paid seat subscriptions
Unreal EngineC++ and BlueprintsHigh-end 3D, photorealistic visualsRoyalty on revenue above a threshold
GodotGDScript, C#Lightweight, open source, 2DFree, MIT license
GameMakerGML2D games, fast prototypingFree and paid commercial tiers
Unity and neighboring game engines

Unity is often chosen over Unreal Engine when a project targets phones or modest hardware, needs fast iteration in a managed language, or relies on the large Asset Store of ready-made tools and content. Unreal is often preferred for large 3D productions aiming at top-tier visuals out of the box.

Licensing and business considerations

Unity uses a subscription model based on seats. The free Personal plan is available to individuals and small companies below a revenue and funding threshold, while larger studios must buy Pro or Enterprise subscriptions for each developer. Thresholds and prices have changed over the years and should be checked against current terms.

In 2023 Unity announced a per-install runtime fee, which caused strong protests from developers and led some studios to move to other engines. The fee was later withdrawn, but the episode made licensing risk a standard part of engine selection, and many teams now weigh the stability of terms alongside technical features.

Strengths, limitations and common mistakes

Unity’s main strengths are fast iteration, wide platform reach and a large community with abundant tutorials. Its flexibility can also become a weakness, because the engine leaves many architectural decisions to the developer.

PitfallConsequenceBetter practice
Heavy logic in UpdateCPU cost grows with object countUse events, timers or DOTS for many objects
Frequent memory allocationGarbage collection spikes and stutterPool objects, avoid allocations per frame
Wrong pipeline choiceCostly conversion laterPick URP or HDRP at project start
Unvetted Asset Store packagesConflicts and technical debtEvaluate maintenance and source access
Large scenes without streamingLong load times and memory useUse additive scenes and addressable assets
Common Unity pitfalls and how to avoid them

The idea in brief

Unity is a toolkit for making games. It provides the parts every game needs, such as graphics, physics, sound and controls, so creators can focus on their own ideas instead of building everything from scratch.

It is like a well-equipped workshop with ready tools and workbenches. One project can then be shipped to phones, computers, consoles and headsets, which is why so many small teams and mobile studios use it.

A practical scenario

A three-person independent studio plans a stylized 2D platformer for PC, a handheld console and phones. They choose Unity with the Universal Render Pipeline, because it runs well on modest hardware and supports 2D lighting.

The programmer writes player movement and enemy behavior in C#, while the artist imports sprites and builds levels from prefabs in the editor. A tilemap tool and a purchased dialogue system from the Asset Store save several weeks of work.

After eighteen months, the team builds the same project for three platforms, adjusting only input handling and resolution settings. Profiling reveals garbage collection spikes on phones, which they fix by pooling projectiles, and the game ships with a stable 60 fps on every target device.