Entity.Batch().md
July 25, 2024 ยท View on GitHub
Friflo.Engine.ECS
Friflo.Engine.ECS.Entity
Entity.Batch() Method
Returns an EntityBatch to add/remove components or tags to/from this entity using the batch.
See Example.
public Friflo.Engine.ECS.EntityBatch Batch();
Returns
Remarks
The returned batch is used to add/removed components and tags.
These changes are applied to the entity when calling Apply().
Subsequent use of the batch throws BatchAlreadyAppliedException.
If missing the Apply() call:
- Entity changes are not applied.
- Some unnecessary memory allocations.
When calling Apply() the batch executes without memory allocations.