Hi, fiddling around in a 2D test project to get a hang of DOTS/ECS. I have a component MoveLinear which has a float2 target and float speed. In my MoveLinearSystem I'm moving the entities towards the target. Problem is, I want the entities to move towards the player, which currently is a normal GameObject.
My first thought is to make the Player class update a static Vector2 variable every frame and then use that in the System, however that upsets the BurstCompiler, since I'm "Loading from a non-readonly static field". I feel like the player position should be stored in ECS and accessed from there, but I'm not exactly sure how to do that efficiently. Any input is appreciated.