CommandBufferSynced.md

July 25, 2024 · View on GitHub

Friflo.Engine.ECS

Friflo.Engine.ECS

CommandBufferSynced Class

Same functionality as CommandBuffer but thread safe.
Use this command buffer to record entity changes in parallel queries executed via RunParallel().

public sealed class CommandBufferSynced :
Friflo.Engine.ECS.ICommandBuffer

Inheritance System.Object 🡒 CommandBufferSynced

Implements ICommandBuffer

Methods
AddChild(int, int)Add the entity with the given childId as a child to the entity with the passed parentId.
AddComponent<T>(int, T)Add the given component with type T to the entity with the passed entityId.
AddComponent<T>(int)Add the IComponent with type T to the entity with the passed entityId.
AddScript<T>(int, T)Add the given script to the entity with the passed entityId.
AddTag<T>(int)Add the ITag with type T to the entity with the passed entityId.
AddTags(int, Tags)Add the tags to the entity with the passed entityId.
Clear()
CreateEntity()Creates a new entity on Playback() which will have the returned entity id.
DeleteEntity(int)Deletes the entity with the passed entityId on Playback().
Playback()Execute recorded entity changes. Playback() must be called on the main thread.
See Example.
RemoveChild(int, int)Remove the child entity with given childId from the parent entity with the the passed parentId.
RemoveComponent<T>(int)Remove the IComponent with type T from the entity with the passed entityId.
RemoveScript<T>(int)Remove the Script of the specified type T from the entity with the passed entityId.
RemoveTag<T>(int)Remove the ITag with type T from the entity with the passed entityId.
RemoveTags(int, Tags)Remove the tags from the entity with the passed entityId.
SetComponent<T>(int, T)Set the given component with type T of the entity with the passed entityId.
Explicit Interface Implementations
Friflo.Engine.ECS.ICommandBuffer.AddComponent<T>(int, T)
Friflo.Engine.ECS.ICommandBuffer.AddTags(int, Tags)
Friflo.Engine.ECS.ICommandBuffer.RemoveTags(int, Tags)
Friflo.Engine.ECS.ICommandBuffer.SetComponent<T>(int, T)