Does ECS have some cache of systems?
I have a strange exception:
InvalidOperationException: The previously scheduled job MapGenerationSystem:GenerateMapJob writes to the NativeArray GenerateMapJob.mapTiles. You are trying to schedule a new job FlowFieldSystem:UpdateMapCache, which writes to the same NativeArray (via UpdateMapCache.Data.mapTiles). To guarantee safety, you must include MapGenerationSystem:GenerateMapJob as a dependency of the newly scheduled job.
I have added a dependency to the UpdateMapCache job but still got this error. Then I have removed scheduling of MapGenerationSystem:GenerateMapJob and I still got this error. And then I have commented out this job because I’ve moved its functionality to another job. I’m still getting this error despite this job does not exist in code (is commented out).
I have found a reason. When I am changing code in Rider files do not change in Unity. When I have reimported it it started to work properly.