I am working on a Unity Transport + Jobs server system for my game that has the layout of:
recieve netcode packets -> turn them to game events -> parallel execution of systems -> send back events from each system
Problem is that I keep getting an error:
InvalidOperationException: The previously scheduled job CalculateWorkerVisibilityJob writes to the Unity.Collections.NativeArray`1[System.Int32] CalculateWorkerVisibilityJob.driver.m_PendingBeginSend. You are trying to schedule a new job CalculateMinionVisibilityJob, which writes to the same Unity.Collections.NativeArray`1[System.Int32] (via CalculateMinionVisibilityJob.driver.m_PendingBeginSend). To guarantee safety, you must include CalculateWorkerVisibilityJob as a dependency of the newly scheduled job.
But this makes no sense because I use the NetworkDriver.Concurrent that I get using NetworkDriver.ToConcurrent().