ECS Survival Guide
Tutorial
·
Beginner
·
+10XP
·
10 mins
·
(406)
Unity Technologies

In this tutorial, you will learn at a very high level about the Entity Component System (ECS) and how it is different from the typical object-oriented or component-based system you are probably familiar with.
If you are preparing to take the Unity Certified User: Programmer exam, or just want to know what ECS is at a very high level, this will be a very helpful tutorial.
Languages available:
1. Overview
The Entity Component System (ECS) is part of the new Data-Oriented Technology Stack (DOTS) and represents an entirely new way to think about programming.
Within this new framework, rather than being structured around objects (e.g. Enemy, Obstacle) or Components (e.g. MoveForward, DestroyOnCollision), code is structured around key pieces of data (e.g. MoveSpeed, PlayerHealth).
The benefit of this new system is that it allows for an extreme improvement to performance and optimization previously not thought possible.
2. What is ECS and what does it look like?
Although actually creating projects within this system is extremely advanced, if you are preparing to take the Unity Certified User: Programmer exam or are just curious what this technology can do at a very high level, the video below will be very helpful.
In this video, you will see the power of DOTS and you will learn how to recognize code that is using ECS.
3. Recap
In this tutorial, you learned:
- The purpose of DOTS and ECS
- The difference between data-oriented vs object-oriented / component-based design
- How to recognize a class using ECS, including:
- Different "using" statements (e.g. "using Unity.Entities;")
- Inheriting from classes other than Monobehaviour (e.g. "JobComponentSystem")
- The structuring of code around data (e.g. "MoveSpeed") rather than components or objects
