In the "Introduction" we stuck with "Entity → It is an identifier." but there is a lot more to it.
An Entity is more of an ID provider. This ID is given to all the unique components that come under the one Entity.
For example, if there is a GameObject which represents a cube, it will have a Transform, Mesh Filter, Mesh Renderer, Box Collider, etc. These are components in Authoring data format. When they are converted into an Entity, these properties will turn into Runtime data format.
The logic(scripts) that you create to define the behavior of an Entity is totally separate from the Entity's data itself and data belonging to entity will be arranged contiguously in physical memory with respect to their entity type.
This ability to keep data organized and keep logic separate from the Entity allows bulk manipulation and easy access to data, resulting in a huge performance boost.
Baking
NOTE!
Subscene is used to convert the GameObject to entity because Unity's core scene system is incompatible with ECS.
The conversion of a GameObject to an Entity is called Baking. This process takes in Authoring data and converts it into Runtime data, where:
- Authoring data is the data of the object in the Unity Editor
- Runtime data is the data that ECS processes during runtime


Top comments (0)