GetBufferFromEntity in ComponentSystem (not JobComponentSystem)?

Hello,

In a JobComponentSystem, I can use:

  • GetComponentDataFromEntity(), and
  • GetBufferFromEntity()

In a ComponentSystem, I can use:

  • GetComponentDataFromEntity()
    (but GetBufferFromEntity is not available)

My question therefore is:
How can I access an entity’s DynamicBuffer from an IJobParallelFor with a ComponentSystem?

Cheers.

If you are using jobs use JobComponentSystem

If it was a main thread ForEach, just use the entitymanager methods for getting that buffer. Since its in a job you should really be using a job system. You might need to rethink how you’re operating on your data.

Thanks guys, for some reason I got so used to using IJobForEach and IJobChunk that I forgot I could use an IJobParallelFor with my own logic with a JobComponentSystem.

1 Like