How to run system if first query matches, but pick second query entities for processing?

Title.

I’ve got an entity query that should determine, whether the system should run.
And an entity query I want to run processing on. Thing is, I need to return dependencies for the job that runs on the second query, so I can’t just use GetEntityQuery(…) for setting dependencies.

And I can’t leave
var components = query.ToComponentDataArray(Allocator.TempJob))
if (components.Length == 0) return;

because that will eat some ops.

So, how do I run system on this case?

Note that components of the first query is located on the different entity, so I can’t add them to the second query.

RequireForUpdate?

1 Like

Yep, that was exactly what I was looking for. There’s even RequireSingletonForUpdate. Really cool stuff.

Thanks :slight_smile: