ScenesLoadWindow.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using System.Collections;
  5. using System.Collections.Generic;
  6. using UnityEngine;
  7. using UnityEditor;
  8. using System.IO;
  9. using System.Linq;
  10. using System;
  11. using PublicTools.XMLDataBase;
  12. using XRTool.UI;
  13. using UnityEngine.SceneManagement;
  14. using UnityEditor.UI;
  15. namespace XRTool.Util
  16. {
  17. /// <summary>
  18. /// 场景Load面板
  19. /// 显示此场景的所有内容
  20. /// </summary>
  21. public class ScenesLoadWindow : EditorWindow
  22. {
  23. [MenuItem("XRTool/Utilities/ScenesLoadWindow", false, 0)]
  24. public static void OpenWindow()
  25. {
  26. // Dock it next to the Scene View.
  27. var window = GetWindow<ScenesLoadWindow>(typeof(ScenesLoadWindow));
  28. window.titleContent = new GUIContent("ScenesLoadWindow");
  29. window.Show();
  30. //ButtonEditor
  31. }
  32. private string[] scenesList;
  33. private void OnEnable()
  34. {
  35. scenesList = null;
  36. scenesList = new string[SceneManager.sceneCount];
  37. for (int i = 0; i < SceneManager.sceneCount; i++)
  38. {
  39. scenesList[i] = SceneManager.GetSceneAt(i).name;
  40. }
  41. }
  42. private void OnGUI()
  43. {
  44. }
  45. }
  46. }