Motivation: to access reactive entities with IJobForEachWithEntity to get ISystemStateBufferElementData or to react on that with IJobForEach<T, CleanupEntity>
Example:
[RequireComponentTag(typeof(NetworkEvent))]
public struct ServerReactiveJob : IJobForEachWithEntity<CleanupEntity>
{
[NativeDisableParallelForRestriction]
[ReadOnly]
public BufferFromEntity<NetworkEvent> NetworkEventBufferArray;
public void Execute(Entity entity, int index, [ReadOnly] ref CleanupEntity cleanupEntity)
{
var buffer = NetworkEventBufferArray[entity];
// Do work for each of the destroyed entities.
}
}