Beispiel #1
0
        protected void LoadSceneCommandHandler(LoadSceneCommand cmd)
        {
            //Do not load scene if scene is already loaded and cmd.doNotLoadIfSceneAlreadyExists is set to true (default)
            //if(cmd.doNotLoadIfSceneAlreadyExists && _sceneService.IsSceneLoaded(cmd.sceneID)) return;

            if (cmd.asynchron)
            {
                _sceneService.LoadAsync(cmd.sceneID, cmd.additive, cmd.makeActive);
            }
            else
            {
                _sceneService.Load(cmd.sceneID, cmd.additive, cmd.makeActive);
            }
        }