# Entity Component System

### Overview

ECS is a way of writing code that provides high performance by default.

Under the hood **coherence** is entirely ECS based but we supply the **coherence** Toolkit which is Mono-based to make it easier to make massive multiplayer games whatever way you want.

{% hint style="info" %}
The current version of **coherence** uses the Unity Entities package. Unity [recently announced ](https://forum.unity.com/threads/notice-on-dots-compatibility-with-unity-2021-1.1091800/#post-7029421)that they will not support this package in Unity 2021 for a while. This means that the current recommended Unity version for using **coherence** is Unity 2020 LTS. This is only temporary as we have been working on removing the reliance on Entities internally.
{% endhint %}

If you would like to use the **coherence** SDK without the toolkit, we would recommend you take some time to learn about ECS and DOTS (Data Orientated Tech Stack) with Unity.

### ECS has three principal parts:

Entities — the entities, or things, that populate your game or program.

Components — the data associated with your entities, but organized by the data itself rather than by entity. (This difference in organization is one of the key differences between an object-oriented and a data-oriented design.)

Systems — the logic that transforms the component data from its current state to its next state— for example, a system might update the positions of all moving entities by their velocity times the time interval since the previous frame.

Here are various materials to learn:

* Unity DOTS Overview - <https://unity.com/dots>
* Unity ECS Documentation - <https://docs.unity3d.com/Packages/com.unity.entities@0.14/manual/index.html>
* Unity Learn, ECS -  <https://learn.unity.com/tutorial/entity-component-system>
