public static void OpenSceneUsingSceneSelect()
        {
            SolutionPaths.CurrentSceneData.Clear();
            ManiacEditor.Controls.SceneSelect.SceneSelectWindow select;

            if (!EditorLoad())
            {
                select       = new ManiacEditor.Controls.SceneSelect.SceneSelectWindow(Instance);
                select.Owner = Instance;
                select.ShowDialog();
            }
            else
            {
                select       = new ManiacEditor.Controls.SceneSelect.SceneSelectWindow(Instance);
                select.Owner = Instance;
                select.ShowDialog();
            }

            if (select.DialogResult != true)
            {
                return;
            }
            if (PreLoad() == false)
            {
                return;
            }

            SetPathData(select.SceneSelect.SceneState);

            LoadSequence();
        }
        public static void OpenSceneSelectSaveState(ManiacEditor.Classes.Prefrences.DataStateHistoryStorage.DataStateHistoryCollection.SaveState SaveState)
        {
            SolutionPaths.CurrentSceneData.Clear();
            ManiacEditor.Controls.SceneSelect.SceneSelectWindow select;
            ManiacEditor.Methods.Solution.SolutionPaths.SetGameConfig(SaveState.MasterDataDirectory);

            select = new ManiacEditor.Controls.SceneSelect.SceneSelectWindow(Instance);

            select.Owner = Instance;
            select.SceneSelect.LoadSaveState(SaveState);
            select.ShowDialog();


            if (select.DialogResult != true)
            {
                return;
            }
            if (PreLoad() == false)
            {
                return;
            }

            SetPathData(select.SceneSelect.SceneState);
            LoadSequence();
        }
示例#3
0
        public static Scene GetSceneForObjectImporting(Window window = null)
        {
            string selectedScene;

            ManiacEditor.Controls.SceneSelect.SceneSelectWindow select = new ManiacEditor.Controls.SceneSelect.SceneSelectWindow(Editor, false, false);
            select.Owner = Window.GetWindow(window);
            select.ShowDialog();
            if (select.SceneSelect.SceneState.FilePath == null)
            {
                return(null);
            }
            selectedScene = select.SceneSelect.SceneState.FilePath;

            if (!File.Exists(selectedScene))
            {
                string[] splitted = selectedScene.Split('/');

                string part1 = splitted[0];
                string part2 = splitted[1];

                selectedScene = Path.Combine(ManiacEditor.Methods.Solution.SolutionPaths.CurrentSceneData.MasterDataDirectory, "Stages", part1, part2);
            }
            return(new Scene(selectedScene));
        }