I have a SystemBase system that includes a job that does a CastRay against the CollisionWorld.
To run in FixedUpdate(), I previously:
- Added the [DisableAutoCreation] attribute to my SystemBase system
- Manually called mySystem.Update() from FixedUpdate() in a monobehaviour
- To ensure physics world updates first, in OnUpdate():
this.Dependency = JobHandle.CombineDependencies(this.Dependency, buildPhysicsWorld.GetOutputDependency());
In entities/unity physics 1.2.3 I think I need to:
Replace [DisableAutoCreation] with:
[UpdateInGroup(typeof(PhysicsSystemGroup))]
[UpdateAfter(typeof(PhysicsInitializeGroup))]
Does this look correct, and do I still need some kind of CombineDendencies()?