Hey guys!
So this time, it would be nice if I could prevent the execution of a job or to stop the current iteration.
how do I achieve that?
var arrayHandle = Job.WithCode(() =>
{
array = queue.ToArray(Allocator.TempJob);
if (array.Length == 0)
{
// prevent next Job here
}
}).Schedule(queueHandle);
Entities.ForEach((in Entity entity, in UnassignedGravity gravity, in Translation translation) =>
{
if (array.Length == 0)
{
//end iteration here
}
// rest of code
}).ScheduleParallel(arrayHandle);