Since Unity 2018.3, it has introduced as a new way to write code in Uniity, which is call Entity Component System (ECS). It provides a way to write performant code by default.
The ECS offers a better approach to game design that allows you to concentrate on the data and behavior that are the core problem of a game. It takes advantage of the C# Job System and Burst Compiler, and allows you to take full advantage of modern chip’s multicore processors. Moving from object-oriented to data-oriented design makes it easier for you to reuse the code and easier for others to understand and work on it.
Steps to add ECS to a project:
- Create a new or open an existing Unity project.
- Open the Package Manager via Window > Package Manager.
- Open the Advanced Project Settings menu via the Gear button on the left side of search box.
- Turn on the Enable preview packages option.
- Back to Package manager and click on the Plus (+) icon and choose Add package from git URL.
- Add com.unity.rendering.hybrid. Then wait a bit for Unity to download and enable the package and its dependencies.