예제 #1
0
        protected override void OnCreate()
        {
            m_BuildPhysicsWorldSystem = World.GetOrCreateSystem <BuildPhysicsWorld>();
            m_StepPhysicsWorldSystem  = World.GetOrCreateSystem <StepPhysicsWorld>();
            m_EndFramePhysicsSystem   = World.GetOrCreateSystem <EndFramePhysicsSystem>();

            m_SharedData = SharedData.Create();
        }
예제 #2
0
        protected override void OnCreate()
        {
            m_BuildPhysicsWorldSystem = World.GetOrCreateSystem <BuildPhysicsWorld>();
            m_EndFramePhysicsSystem   = World.GetOrCreateSystem <EndFramePhysicsSystem>();

            m_SharedData = SharedData.Create();

#if !ENABLE_UNITY_COLLECTIONS_CHECKS
            // Calling RequireForUpdate will mean that the system will not be updated if there are no dynamic bodies.
            // However, if we are performing want collider integrity checks we need the system to run regardless.
            RequireForUpdate(m_BuildPhysicsWorldSystem.DynamicEntityGroup);
#endif
        }