Conversions

May 24, 2020 ยท View on GitHub

If you're not familiar with the GameObject Conversion Pipeline in Unity's ECS architecture, it is a way to convert Unity's GameObjects to their Entities version.

Typically there are a few ways to author conversions.

IConvertGameObjectToEntity

An interface implemented into a MonoBehaviour. Typically you override the following function:

Convert(Entity entity, EntityManager dstManager, GameObjectConversionSystem conversionSystem) { ... }

You can add component data and dynamic buffers within the function body.

GameObjectConversionSystem

GameObjectConversionSystems are specialized ComponentSystems to process converted GameObjects. UGUIDOTs utilizes GameObjectConversonSystem to convert the entire Canvas hierarchy into their entity version with the correct components.

For more detailed instructons on the entire conversion 5argon's blog about conversion.

Currently in UGUIDOTS:

Conversion currently happen on the following UI components:

You can view each of their following links to view which components are added to the entity.