Exemplo n.º 1
0
        static int __CreateInstance(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                if (LuaAPI.lua_gettop(L) == 2 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING))
                {
                    string _name = LuaAPI.lua_tostring(L, 2);

                    Unity.Entities.World gen_ret = new Unity.Entities.World(_name);
                    translator.Push(L, gen_ret);

                    return(1);
                }
            }
            catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(LuaAPI.luaL_error(L, "invalid arguments to Unity.Entities.World constructor!"));
        }
Exemplo n.º 2
0
        static int _m_Update(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                Unity.Entities.World gen_to_be_invoked = (Unity.Entities.World)translator.FastGetCSObj(L, 1);



                {
                    gen_to_be_invoked.Update(  );



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
Exemplo n.º 3
0
        static int _m_ToString(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                Unity.Entities.World gen_to_be_invoked = (Unity.Entities.World)translator.FastGetCSObj(L, 1);



                {
                    string gen_ret = gen_to_be_invoked.ToString(  );
                    LuaAPI.lua_pushstring(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
Exemplo n.º 4
0
        static int _m_DestroyManager(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                Unity.Entities.World gen_to_be_invoked = (Unity.Entities.World)translator.FastGetCSObj(L, 1);



                {
                    Unity.Entities.ScriptBehaviourManager _manager = (Unity.Entities.ScriptBehaviourManager)translator.GetObject(L, 2, typeof(Unity.Entities.ScriptBehaviourManager));

                    gen_to_be_invoked.DestroyManager(_manager);



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
Exemplo n.º 5
0
        static int _m_DestroySystem(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                Unity.Entities.World gen_to_be_invoked = (Unity.Entities.World)translator.FastGetCSObj(L, 1);



                {
                    Unity.Entities.ComponentSystemBase _system = (Unity.Entities.ComponentSystemBase)translator.GetObject(L, 2, typeof(Unity.Entities.ComponentSystemBase));

                    gen_to_be_invoked.DestroySystem(_system);



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
Exemplo n.º 6
0
        static int _m_GetExistingSystem(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                Unity.Entities.World gen_to_be_invoked = (Unity.Entities.World)translator.FastGetCSObj(L, 1);



                {
                    System.Type _type = (System.Type)translator.GetObject(L, 2, typeof(System.Type));

                    Unity.Entities.ComponentSystemBase gen_ret = gen_to_be_invoked.GetExistingSystem(_type);
                    translator.Push(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
Exemplo n.º 7
0
        private List <IDependency> CreateDependencies(out GameStateManager gameStateManager)
        {
            List <IDependency> dependencies = new List <IDependency>();

            dependencies.Add(gameStateManager = new GameStateManager());

            dependencies.AddRange(CreateAdditionalDependencies());
            dependencies.AddRange(CreateBehaviours());
            dependencies.AddRange(KodeboldScriptableObjects);

            //Get all our created Kodebold systems and add them into the dependencies
            Unity.Entities.World world = Unity.Entities.World.DefaultGameObjectInjectionWorld;
            int systemCount            = world.Systems.Count;

            for (int systemIndex = 0; systemIndex < systemCount; systemIndex++)
            {
                if (world.Systems[systemIndex] is KodeboldJobSystem system)
                {
                    dependencies.Add(system);
                }
            }

            return(dependencies);
        }
Exemplo n.º 8
0
        static int _m_GetOrCreateManager(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                Unity.Entities.World gen_to_be_invoked = (Unity.Entities.World)translator.FastGetCSObj(L, 1);



                {
                    System.Type _type = (System.Type)translator.GetObject(L, 2, typeof(System.Type));

                    Unity.Entities.ScriptBehaviourManager gen_ret = gen_to_be_invoked.GetOrCreateManager(_type);
                    translator.Push(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
Exemplo n.º 9
0
 private void ConfigureFpsSystems(Unity.Entities.World world)
 {
     world.GetOrCreateManager <ServerHealthModifierSystem>();
     world.GetOrCreateManager <HealthRegenSystem>();
 }
Exemplo n.º 10
0
 private void ConfigurePlayerLifeCycle(Unity.Entities.World world)
 {
     PlayerLifecycleHelper.AddServerSystems(world);
     GameObjectCreationHelper.EnableStandardGameObjectCreation(Worker.World);
 }
Exemplo n.º 11
0
        protected static Unity.Entities.World GetOrCreateWorldInternal()
        {
            if (Unity.Entities.World.DefaultGameObjectInjectionWorld != null && Unity.Entities.World.DefaultGameObjectInjectionWorld.Name == m_worldName)
            {
                return(Unity.Entities.World.DefaultGameObjectInjectionWorld);
            }

            Unity.Entities.World world = new Unity.Entities.World(m_worldName);
            Unity.Entities.World.DefaultGameObjectInjectionWorld = world;

            //INITIALISATION
            Unity.Entities.InitializationSystemGroup initSystemGroup = world.GetOrCreateSystem <Unity.Entities.InitializationSystemGroup>();

            initSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Entities.BeginInitializationEntityCommandBufferSystem>());
            initSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Entities.ConvertToEntitySystem>());
            initSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Entities.RetainBlobAssetSystem>());
            initSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Entities.UpdateWorldTimeSystem>());

            {
                Unity.Scenes.SceneSystemGroup sceneSystemGroup = world.GetOrCreateSystem <Unity.Scenes.SceneSystemGroup>();
                initSystemGroup.AddSystemToUpdateList(sceneSystemGroup);

                sceneSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Scenes.SceneSystem>());
                sceneSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Scenes.ResolveSceneReferenceSystem>());
                sceneSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Scenes.SceneSectionStreamingSystem>());
            }

            initSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Transforms.CopyInitialTransformFromGameObjectSystem>());

            m_initialisationBehaviourUpdaterSystem = world.GetOrCreateSystem <InitialisationBehaviourUpdaterSystem>();
            initSystemGroup.AddSystemToUpdateList(m_initialisationBehaviourUpdaterSystem);

            initSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Entities.EndInitializationEntityCommandBufferSystem>());

            //SIMULATION
            Unity.Entities.SimulationSystemGroup simSystemGroup = world.GetOrCreateSystem <Unity.Entities.SimulationSystemGroup>();


            simSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Entities.BeginSimulationEntityCommandBufferSystem>());
            //simSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem<DebugStream>()); //Unity system, they just didn't put it in a namespace hurr durr.
            simSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Physics.Systems.BuildPhysicsWorld>());
            simSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Physics.Authoring.DisplayJointsSystem>());
            simSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Physics.Systems.StepPhysicsWorld>());
            simSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Physics.Systems.ExportPhysicsWorld>());
            simSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Physics.Authoring.DisplayContactsSystem>());
            simSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Physics.Authoring.DisplayBroadphaseAabbsSystem>());
            simSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Physics.Authoring.DisplayColliderAabbsSystem>());
            simSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Physics.Authoring.DisplayBodyColliders>());
            simSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Physics.Authoring.DisplayCollisionEventsSystem>());
            simSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Physics.Authoring.DisplayContactsSystem>());
            simSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Physics.Authoring.DisplayMassPropertiesSystem>());
            simSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Physics.Authoring.DisplayTriggerEventsSystem>());
            simSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Physics.Systems.EndFramePhysicsSystem>());

            {
                Unity.Transforms.TransformSystemGroup transformSystemGroup = world.GetOrCreateSystem <Unity.Transforms.TransformSystemGroup>();
                simSystemGroup.AddSystemToUpdateList(transformSystemGroup);

                transformSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Transforms.CopyTransformFromGameObjectSystem>());
                transformSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Transforms.EndFrameCompositeScaleSystem>());
                transformSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Transforms.EndFrameParentSystem>());
                transformSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Transforms.EndFramePostRotationEulerSystem>());
                transformSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Transforms.EndFrameRotationEulerSystem>());
                transformSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Transforms.EndFrameCompositeRotationSystem>());
                transformSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Transforms.EndFrameParentScaleInverseSystem>());
                transformSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Transforms.EndFrameTRSToLocalToParentSystem>());
                transformSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Transforms.EndFrameTRSToLocalToWorldSystem>());
                transformSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Transforms.EndFrameLocalToParentSystem>());
                transformSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Transforms.CopyTransformToGameObjectSystem>());
                transformSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Transforms.EndFrameWorldToLocalSystem>());
            }

            m_updateBehaviourUpdaterSystem = world.GetOrCreateSystem <UpdateBehaviourUpdaterSystem>();
            simSystemGroup.AddSystemToUpdateList(m_updateBehaviourUpdaterSystem);

            simSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Entities.EndSimulationEntityCommandBufferSystem>());


            //PRESENTATION
            Unity.Entities.PresentationSystemGroup presentationSystemGroup = world.GetOrCreateSystem <Unity.Entities.PresentationSystemGroup>();

            presentationSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Entities.BeginPresentationEntityCommandBufferSystem>());

            {
                Unity.Rendering.StructuralChangePresentationSystemGroup structuralChangePresentationSystemGroup = world.GetOrCreateSystem <Unity.Rendering.StructuralChangePresentationSystemGroup>();
                presentationSystemGroup.AddSystemToUpdateList(structuralChangePresentationSystemGroup);

                structuralChangePresentationSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Rendering.AddWorldAndChunkRenderBounds>());
                structuralChangePresentationSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Rendering.AddLodRequirementComponents>());
            }

            {
                Unity.Rendering.UpdatePresentationSystemGroup updatePresentationSystemGroup = world.GetOrCreateSystem <Unity.Rendering.UpdatePresentationSystemGroup>();
                presentationSystemGroup.AddSystemToUpdateList(updatePresentationSystemGroup);

                updatePresentationSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Rendering.RenderBoundsUpdateSystem>());
                updatePresentationSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Rendering.LodRequirementsUpdateSystem>());
            }

            presentationSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Rendering.RenderMeshSystemV2>());
            presentationSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <EndFrameJobCompleteSystem>());

            Unity.Entities.ScriptBehaviourUpdateOrder.UpdatePlayerLoop(world);

            return(world);
        }
Exemplo n.º 12
0
        private static Unity.Entities.World GetOrCreateWorld()
        {
            if (Unity.Entities.World.DefaultGameObjectInjectionWorld != null && Unity.Entities.World.DefaultGameObjectInjectionWorld.Name == "KodeboldsWorld")
            {
                return(Unity.Entities.World.DefaultGameObjectInjectionWorld);
            }

            Unity.Entities.World world = new Unity.Entities.World("KodeboldsWorld");
            Unity.Entities.World.DefaultGameObjectInjectionWorld = world;

            //INITIALISATION
            Unity.Entities.InitializationSystemGroup initSystemGroup = world.GetOrCreateSystem <Unity.Entities.InitializationSystemGroup>();

            initSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Entities.BeginInitializationEntityCommandBufferSystem>());
            initSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Entities.ConvertToEntitySystem>());
            initSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <CameraSyncSystem>());
            initSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <InputManagementSystem>());
            initSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <InstantiationSystem>());
            initSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <SpawningSystem>());
            initSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Entities.RetainBlobAssetSystem>());
            initSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Entities.UpdateWorldTimeSystem>());

            {
                Unity.Scenes.SceneSystemGroup sceneSystemGroup = world.GetOrCreateSystem <Unity.Scenes.SceneSystemGroup>();
                initSystemGroup.AddSystemToUpdateList(sceneSystemGroup);

                sceneSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Scenes.SceneSystem>());
                sceneSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Scenes.ResolveSceneReferenceSystem>());
                sceneSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Scenes.SceneSectionStreamingSystem>());
            }

            initSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Transforms.CopyInitialTransformFromGameObjectSystem>());

            //Must run after CopyInitialTransformFromGameObjectSystem.
            initSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <FreezeRotationSystem>());

            initSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Entities.EndInitializationEntityCommandBufferSystem>());

            //SIMULATION
            Unity.Entities.SimulationSystemGroup simSystemGroup = world.GetOrCreateSystem <Unity.Entities.SimulationSystemGroup>();


            simSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Entities.BeginSimulationEntityCommandBufferSystem>());
            //simSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem<DebugStream>()); //Unity system, they just didn't put it in a namespace hurr durr.
            simSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Physics.Systems.BuildPhysicsWorld>());
            simSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Physics.Authoring.DisplayJointsSystem>());
            simSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Physics.Systems.StepPhysicsWorld>());
            simSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Physics.Systems.ExportPhysicsWorld>());
            simSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Physics.Authoring.DisplayContactsSystem>());
            simSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Physics.Authoring.DisplayBroadphaseAabbsSystem>());
            simSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Physics.Authoring.DisplayColliderAabbsSystem>());
            simSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Physics.Authoring.DisplayBodyColliders>());
            simSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Physics.Authoring.DisplayCollisionEventsSystem>());
            simSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Physics.Authoring.DisplayContactsSystem>());
            simSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Physics.Authoring.DisplayMassPropertiesSystem>());
            simSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Physics.Authoring.DisplayTriggerEventsSystem>());
            simSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Physics.Systems.EndFramePhysicsSystem>());

            {
                PostPhysicsSystemsGroup postPhysicsSystemsGroup = world.GetOrCreateSystem <PostPhysicsSystemsGroup>();
                simSystemGroup.AddSystemToUpdateList(postPhysicsSystemsGroup);

                postPhysicsSystemsGroup.AddSystemToUpdateList(world.GetOrCreateSystem <RaycastSystem>());
                postPhysicsSystemsGroup.AddSystemToUpdateList(world.GetOrCreateSystem <SpawningQueueSystem>());
                postPhysicsSystemsGroup.AddSystemToUpdateList(world.GetOrCreateSystem <SelectionSystem>());
                postPhysicsSystemsGroup.AddSystemToUpdateList(world.GetOrCreateSystem <CameraControlSystem>());
                postPhysicsSystemsGroup.AddSystemToUpdateList(world.GetOrCreateSystem <HarvestingSystem>());
                postPhysicsSystemsGroup.AddSystemToUpdateList(world.GetOrCreateSystem <DepositSystem>());
                postPhysicsSystemsGroup.AddSystemToUpdateList(world.GetOrCreateSystem <UnitMoveSystem>());
                postPhysicsSystemsGroup.AddSystemToUpdateList(world.GetOrCreateSystem <CombatSystem>());
                postPhysicsSystemsGroup.AddSystemToUpdateList(world.GetOrCreateSystem <ProjectileSystem>());
                postPhysicsSystemsGroup.AddSystemToUpdateList(world.GetOrCreateSystem <DeathSystem>());
            }

            {
                //These systems must be updated after all the game logic systems as state transitions add/remove components via an entity command buffer, meaning the command status data
                //will be out of sync with the state components until the next sync point (command buffer system).
                //We do this step at the end to avoid an additional sync point that would halt the main thread.
                CommandStateProcessingSystemsGroup commandStateProcessingSystemsGroup = world.GetOrCreateSystem <CommandStateProcessingSystemsGroup>();
                simSystemGroup.AddSystemToUpdateList(commandStateProcessingSystemsGroup);

                commandStateProcessingSystemsGroup.AddSystemToUpdateList(world.GetOrCreateSystem <FindAITargetSystem>());
                commandStateProcessingSystemsGroup.AddSystemToUpdateList(world.GetOrCreateSystem <CommandProcessSystem>());
                commandStateProcessingSystemsGroup.AddSystemToUpdateList(world.GetOrCreateSystem <PathFindingSystem>());
                commandStateProcessingSystemsGroup.AddSystemToUpdateList(world.GetOrCreateSystem <StateTransitionSystem>());
            }

            {
                Unity.Transforms.TransformSystemGroup transformSystemGroup = world.GetOrCreateSystem <Unity.Transforms.TransformSystemGroup>();
                simSystemGroup.AddSystemToUpdateList(transformSystemGroup);

                transformSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Transforms.CopyTransformFromGameObjectSystem>());
                transformSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Transforms.EndFrameCompositeScaleSystem>());
                transformSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Transforms.EndFrameParentSystem>());
                transformSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Transforms.EndFramePostRotationEulerSystem>());
                transformSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Transforms.EndFrameRotationEulerSystem>());
                transformSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Transforms.EndFrameCompositeRotationSystem>());
                transformSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Transforms.EndFrameParentScaleInverseSystem>());
                transformSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Transforms.EndFrameTRSToLocalToParentSystem>());
                transformSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Transforms.EndFrameTRSToLocalToWorldSystem>());
                transformSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Transforms.EndFrameLocalToParentSystem>());
                transformSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Transforms.CopyTransformToGameObjectSystem>());
                transformSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Transforms.EndFrameWorldToLocalSystem>());
            }

            {
                BehaviourUpdaterSystemsGroup behaviourUpdaterSystemsGroup = world.GetOrCreateSystem <BehaviourUpdaterSystemsGroup>();
                simSystemGroup.AddSystemToUpdateList(behaviourUpdaterSystemsGroup);

                m_behaviourUpdaterSystem = world.GetOrCreateSystem <BehaviourUpdaterSystem>();

                behaviourUpdaterSystemsGroup.AddSystemToUpdateList(m_behaviourUpdaterSystem);
            }

            simSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Entities.EndSimulationEntityCommandBufferSystem>());


            //PRESENTATION
            Unity.Entities.PresentationSystemGroup presentationSystemGroup = world.GetOrCreateSystem <Unity.Entities.PresentationSystemGroup>();

            presentationSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Entities.BeginPresentationEntityCommandBufferSystem>());

            {
                Unity.Rendering.StructuralChangePresentationSystemGroup structuralChangePresentationSystemGroup = world.GetOrCreateSystem <Unity.Rendering.StructuralChangePresentationSystemGroup>();
                presentationSystemGroup.AddSystemToUpdateList(structuralChangePresentationSystemGroup);

                structuralChangePresentationSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Rendering.AddWorldAndChunkRenderBounds>());
                structuralChangePresentationSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Rendering.AddLodRequirementComponents>());
            }

            {
                Unity.Rendering.UpdatePresentationSystemGroup updatePresentationSystemGroup = world.GetOrCreateSystem <Unity.Rendering.UpdatePresentationSystemGroup>();
                presentationSystemGroup.AddSystemToUpdateList(updatePresentationSystemGroup);

                updatePresentationSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Rendering.RenderBoundsUpdateSystem>());
                updatePresentationSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Rendering.LodRequirementsUpdateSystem>());
            }

            presentationSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <Unity.Rendering.RenderMeshSystemV2>());
            presentationSystemGroup.AddSystemToUpdateList(world.GetOrCreateSystem <EndFrameJobCompleteSystem>());

            Unity.Entities.ScriptBehaviourUpdateOrder.UpdatePlayerLoop(world);

            return(world);
        }