Exemple #1
0
        public static void OpenLastScene()
        {
            var lastScene = EditorPrefs.GetString(LastScenePrefKey);

            if (!string.IsNullOrEmpty(lastScene))
            {
                ToolsHelper.OpenScene(lastScene);
            }
            else
            {
                Debug.LogError("Not found last scene!");
            }
        }
Exemple #2
0
        public static void OpenMainScene()
        {
            var currentScene = EditorSceneManager.GetActiveScene().path;
            var mainScene    = "Assets/Main.unity";

            if (mainScene != currentScene)
            {
                EditorPrefs.SetString(LastScenePrefKey, currentScene);
            }

            ToolsHelper.OpenScene(mainScene);

            if (!EditorApplication.isPlaying)
            {
                EditorApplication.isPlaying = true;
            }
        }