EntityConverter.md
May 21, 2024 ยท View on GitHub
Friflo.Engine.ECS
Friflo.Engine.ECS.Serialize
EntityConverter Class
Converts an Entity to a DataEntity and vice versa.
public sealed class EntityConverter
Inheritance System.Object ๐ก EntityConverter
| Fields | |
|---|---|
| Default | An EntityConverter singleton. Must be used only from the main thread. |
| Methods | |
|---|---|
| DataEntityToEntity(DataEntity, EntityStore, string) | Add / update the passed DataEntity in the given store and returns the added / updated Entity. |
| DataEntityToEntityPreserve(DataEntity, EntityStore, string, ComponentTypes, Tags) | Add / update the passed DataEntity in the given store and returns the added / updated Entity. The specified componentTypes and tags are preserved if present on entity. |
| EntityComponentsToJsonMembers(Entity, List<JsonValue>) | |
| EntityToDataEntity(Entity, DataEntity, bool) | Returns the passed Entity as a DataEntity |