Entity Component System

From Unify Community Wiki
(Difference between revisions)
Jump to: navigation, search
m (Introduction)
(recognized and rewrote some parts)
Line 2: Line 2:
 
== Introduction ==
 
== Introduction ==
  
The Unity Entity Component System (ECS) is a new data oriented framework for building games in Unity that is currently being developed by Unity Technologies as part of their [https://unity3d.com/performance-by-default “Performance by Default”] initiative. The [[Package Manager|package]] can be used on it's own but is designed to work with the new [[Job System |C# Job System]] and [[Burst Compiler]] packages to vastly increase engine performance through automatic native code optimization and multi-threading support. Unity claims that using these new systems together can lead to as much as x100 speed improvements over the existing “classic” GameObject and MonoBehaviour system.
+
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 [https://unity3d.com/performance-by-default “Performance by Default”] initiative, along with the new [[Job System |C# Job System]] and [[Burst Compiler]]. The ECS [[Package Manager|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 ==
+
=== Development Status ===
+
Unity ECS is currently in "preview" and not yet considered production ready. You are free to use it to develop and release games today but should be aware that it's currently in active development and you may encounter bugs or stability issues when using it. Many features are also still missing and the API is likely to change before the official 1.0 release. However, trying out the package now allows you to prepare for the future of Unity and provide feedback that will have a direct effect on the final product. Visit the [https://forum.unity.com/forums/entity-component-system-and-c-job-system.147/ official forum] to get involved, ask questions or give feedback.
+
  
== Third-Party Alternatives ==
+
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.
  
For developers looking for production ready entity component systems to use today, there are a few alternatives. Most notable frameworks are [https://github.com/sschmid/Entitas-CSharp Entitas] by Simon Schmid and [https://github.com/sebas77/Svelto.ECS Svelto.ECS] by Sebastiano Mandalà. Both of which have been battle tested in professional game productions.
+
=== Hybrid Approach ===
  
== Installation and Setup ==
+
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 under the Window menu on the toolbar. Using this package with the latest version of Unity is recommended since older versions may not be compatible with the latest version or support all the latest features.
+
=== Installation  ===
  
== Example Projects ==
+
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.
  
* [https://github.com/Unity-Technologies/EntityComponentSystemSamples| Entity Component System Samples] - Official Unity ECS samples repository
+
=== Third-Party Alternatives ===
  
== Official Documentation ==
+
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 [https://github.com/sschmid/Entitas-CSharp Entitas] by Simon Schmid and [https://github.com/sebas77/Svelto.ECS Svelto.ECS] by Sebastiano Mandalà. Both of which have been battle tested in professional game productions and are actively maintained.
  
Since the system is still under heavy development official documentation has not yet been created but you can view a work-in-progress draft [https://github.com/Unity-Technologies/EntityComponentSystemSamples/blob/master/Documentation/index.md here].
+
== Resources ==
[[Category:Scripting]]
+
 
[[Category:ECS]]
+
* [https://github.com/Unity-Technologies/EntityComponentSystemSamples/blob/master/Documentation/index.md Official Documentation] - Work in progress, may contain outdated content.
 +
* [https://github.com/Unity-Technologies/EntityComponentSystemSamples| Entity Component System Samples] - Official Unity ECS samples repository

Revision as of 21:55, 28 December 2018

Contents

Introduction

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.

Installation

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.

Resources

Personal tools
Namespaces

Variants
Actions
Navigation
Extras
Toolbox