I have SystemA and SystemB. Both belong to the same group. B executes after A.
-
SystemA creates a singleton that has a list. That system writes to that list. I make a copy of the Dependency handle, then pass it to the first job, and attach the subsequent handles to the jobs in row… then assign the last handle to Dependency = jobHandle.
-
SystemB finds the singleton, and reads the list on a job. Uses Dependency on that job.
The error says that the previously scheduled job on SystemA writes to that list and we are trying to schedule a job that reads from it afterwards. That we should pass the dependency of that job to this job. I do exactly what it asks for.
Maybe there’s some cryptic stuff I don’t understand about the Dependency property but I’m quite experienced with jobs. ECS is a new thing for me and I wonder… what’s going on.
Things I tried:
- Since the size of the list changes, I pass it as an array with AsDeferredJobArray().
- Tried doing a IParallelJobDefer job passing the list to the job schedule. Also doing the previous.
- Tried converting it to a normal IJob but passing Deferred array.
Obviously if I do a Complete, it works.
I’ve run out of ideas.
[EDIT]
Saw that it happens a lot at the beggining. Then stops happening and does happen again in certain moments, randomly.