Vixen
02b45cc4
csharp
public readonly struct CommandBuffer.ParallelWriter

What a job records through. A struct, so passing it into a job costs nothing.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

The sort key has to identify the work item — the index of the entity or the batch the job is processing. Commands sharing a sort key from different threads have an unspecified order between them, which is the one thing that would make playback depend on how the scheduler happened to distribute the work.

Methods (6)

  • public Entity Create(int sortKey)

    Records the creation of an entity.

  • public void Destroy(int sortKey, Entity entity)

    Records the destruction of an entity.

  • public void Add<T>(int sortKey, Entity entity, in T value)

    Records adding a component, overwriting it if the entity already has one.

  • public void Add<T>(int sortKey, Entity entity)

    Records adding a component with its default value.

  • public void Set<T>(int sortKey, Entity entity, in T value)

    Records overwriting a component the entity has.

  • public void Remove<T>(int sortKey, Entity entity)

    Records removing a component, if the entity has one.

Used by (3)

  • CommandBufferVixen.Ecs
  • CommandBufferTestsVixen.Ecs.Tests
  • DeterminismTestsVixen.Ecs.Tests