public static void OpenLastScene() { var lastScene = EditorPrefs.GetString(LastScenePrefKey); if (!string.IsNullOrEmpty(lastScene)) { ToolsHelper.OpenScene(lastScene); } else { Debug.LogError("Not found last scene!"); } }
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; } }