I have been trying to follow this sample:
https://github.com/Unity-Technologies/EntityComponentSystemSamples/blob/master/EntitiesSamples/EntitiesTutorial/README.md
using unity version 2022.2.9f1
I got to the end of Step 4 but when I hit Play I don't see any cannonballs, instead i get a bunch of errors.
Error 1:
InvalidOperationException: The previously scheduled job TurretShoot reads from the ComponentTypeHandle<Unity.Collections.NativeText.ReadOnly> TurretShoot.JobData.WorldTransformLookup. You must call JobHandle.Complete() on the job TurretShoot, before you can write to the ComponentTypeHandle<Unity.Collections.NativeText.ReadOnly> safely.
Error 2:
ArgumentException: System.ArgumentException: A component with type:{0} has not been added to the entity. This Exception was thrown from a function compiled with Burst, which has limited exception support.
I'm not sure sure if I am doing something wrong, or the samples are not compatible with my editor version.
Also copy+pasting TurretShootingSystem.cs gives this warning in my IDE:
There is no defined ordering between fields in multiple declarations of partial struct 'TurretShootingSystem'. To specify an ordering, all instance fields must be in the same declaration. [Assembly-CSharp]