SaveScene() приватный Метод

private SaveScene ( Scene scene ) : bool
scene Scene
Результат bool
Пример #1
0
    public void Export()
    {
        GameObject screenToMove = GameObject.Instantiate(_loadedScreenCache._duplicateScreen);

        screenToMove.name = _loadedScreenCache._duplicateScreen.name;
        screenToMove.SetActive(false);

        if (_scene.isLoaded)
        {
            foreach (GameObject rootObject in _scene.GetRootGameObjects())
            {
                _screenController = rootObject.GetComponent <ScreenView>();

                if (_screenController != null)
                {
                    GameObject.DestroyImmediate(_screenController.gameObject);
                    break;
                }
            }
        }


        EditorSceneManager.MoveGameObjectToScene(screenToMove, _scene);
        EditorSceneManager.SaveScene(_scene);
    }
        public static bool SaveScene(Scene scene, string dstScenePath)
        {
            bool saveAsCopy = false;

            return(EditorSceneManager.SaveScene(scene, dstScenePath, saveAsCopy));
        }