Entity Component System

From Unify Community Wiki
(Difference between revisions)
Jump to: navigation, search
(Resources: added new sub-section links)
m (Resources: updated link names)
Line 22: Line 22:
== Resources ==
== Resources ==
* [https://github.com/Unity-Technologies/EntityComponentSystemSamples/blob/master/Documentation/index.md Documentation] - Official Unity ECS Documentation (work in progress).
* [https://github.com/Unity-Technologies/EntityComponentSystemSamples/blob/master/Documentation/index.md Unity ECS Documentation] - Official documentation (work in progress).
* [[ECS Overview]] - An overview of the most important elements of Unity ECS.
* [[Unity ECS Overview]] - Covers main concepts and terminology.
* [[ECS FAQ]] – Answers to frequently asked questions about Unity ECS.
* [[Unity ECS FAQ]] – Answers to frequently asked questions about Unity ECS.
* [[ECS Terminology]] – Glossary of common terms used for Unity ECS.
* [[Unity ECS Cookbook]] - Tips, tricks and best practices for common situations.
* [[ECS Cookbook]] - Tips, tricks and best practices for common situations with Unity ECS.
* [[Unity ECS Examples|ECS Examples]] - Collection of links to various sample projects.
* [[ECS Examples|ECS Examples]] - Collection of links to various Unity ECS example projects.
* [[Unity Hybrid ECS]] - Explains how to use both "classic" and ECS components together.
* [[ECS Hybrid]] - Explains how to use both "classic" and ECS Unity components together.

Revision as of 17:54, 29 December 2018



The Entity Component System (ECS) is a new official framework for writing highly optimized, data oriented code in Unity. It's currently being developed by Unity Technologies as part of their “Performance by Default” initiative, along with the new C# Job System and Burst Compiler. The ECS package can be used by itself but is designed to work in unison with these other packages to vastly improve performance through automatic native code optimization and multithread support. Unity claims that using these new packages together can lead to as much as x100 speed improvements over the existing “classic” GameObject and MonoBehaviour architecture!

Development Status

Unity ECS is currently in "preview" and is therefore not yet considered production ready. This means you're free to use it to build games today but should be aware that it's currently in active development so you may encounter bugs and stability issues. Some features are also missing and the API will continue to evolve and change before the official 1.0 release. Unity currently recommends only using the new ECS package for experimentation or if you're just starting your project and plan to release towards the end of 2019 or later. Since the package should be quite stable by then.

Hybrid Approach

This new ECS architecture will eventually replace most existing “classic” systems in Unity (transforms, game objects, renderers, etc.). This will however happen “under the hood”, meaning that traditional Unity workflows will remain mostly unchanged. (e.g. constructing prefabs and adding components to them) However, at the moment there are only a few Unity features implemented in ECS and it will take several years to transition most systems over. This means you currently have to use a somewhat awkward “hybrid approach” if you wish to use most existing Unity features like Physics or Animators with ECS. This is done by using a mix of “classic” and ECS components together.


To use the new ECS features you need to install the Entities package via the Package Manager (introduced in Unity 2018.1) which is accessible from the toolbar menu “Window”. Using this package with the latest version of Unity is recommended since older versions may not be compatible or support all the latest package features.

Third-Party Alternatives

For developers looking for production ready ECS framworks or just want to explore other alternatives there are a few options out there. Most notable ones being Entitas by Simon Schmid and Svelto.ECS by Sebastiano Mandalà. Both of which have been battle tested in professional game productions and are actively maintained.


Personal tools