private void Awake() { if (Manager && Manager != this) { Debug.LogError("ECSPhysicsManager is duplicated", this); Debug.DebugBreak(); Destroy(this); return; } Manager = this; stepPhysicsWorld = World.DefaultGameObjectInjectionWorld.GetOrCreateSystem <StepPhysicsWorld>(); prePhysicsSetDeltaTimeSystem = World.DefaultGameObjectInjectionWorld.GetOrCreateSystem <PrePhysicsSetDeltaTimeSystem>(); }
protected override void OnCreate() { preSystem = World.DefaultGameObjectInjectionWorld.GetOrCreateSystem <PrePhysicsSetDeltaTimeSystem>(); }
protected override void OnCreate() { preSystem = World.Active.GetOrCreateSystem <PrePhysicsSetDeltaTimeSystem>(); }