Example #1
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
        }
Example #2
0
        protected override void OnCreate()
        {
            m_BuildPhysicsWorldSystem  = World.GetOrCreateSystem <BuildPhysicsWorld>();
            m_ExportPhysicsWorldSystem = World.GetOrCreateSystem <ExportPhysicsWorld>();
            m_EndFramePhysicsSystem    = World.GetOrCreateSystem <EndFramePhysicsSystem>();

#if !NET_DOTS
            Assert.AreEqual(Enum.GetValues(typeof(SimulationType)).Length, k_NumSimulationTypes);
#endif

            RegisterSimulation(SimulationType.NoPhysics, () => new DummySimulation());
            RegisterSimulation(SimulationType.UnityPhysics, () => new Simulation());
            RegisterSimulation(SimulationType.HavokPhysics, () =>
                               throw new NotSupportedException("Havok Physics package not present. Use the package manager to add it."));

            base.OnCreate();
        }
Example #3
0
        protected override void OnCreate()
        {
            m_OutputDependency = Dependency;

            m_BuildPhysicsWorldSystem = World.GetOrCreateSystem <BuildPhysicsWorld>();
        }