I’ve been using ForEach in a JobComponentSystem with a lambda as it seemed like that was the latest and greatest way of doing things, but I’m a little stuck trying to write to a BufferElement.
This is the only system that ever writes to the buffer (or reads from it for that matter), and each entity’s buffer is independent of every other entity, so it should be fine writing to them in parallel from my entities.foreach, but it comes up with the warning. I’ve come across NativeDisableParallelForRestriction, but that only seems to help when I’m writing an IJobForEach, or if I downgrade to not-parallel. Are they my only options, or is there a way to specify that I know it’s safe in the lambda format?