DebuggerComponent.SceneInformationWindow.cs 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. //------------------------------------------------------------
  2. // Game Framework v3.x
  3. // Copyright © 2013-2017 Jiang Yin. All rights reserved.
  4. // Homepage: http://gameframework.cn/
  5. // Feedback: mailto:jiangyin@gameframework.cn
  6. //------------------------------------------------------------
  7. using UnityEngine;
  8. using UnityEngine.SceneManagement;
  9. namespace UnityGameFramework.Runtime
  10. {
  11. public partial class DebuggerComponent
  12. {
  13. private sealed class SceneInformationWindow : ScrollableDebuggerWindowBase
  14. {
  15. protected override void OnDrawScrollableWindow()
  16. {
  17. GUILayout.Label("<b>Scene Information</b>");
  18. GUILayout.BeginVertical("box");
  19. {
  20. DrawItem("Scene Count:", SceneManager.sceneCount.ToString());
  21. DrawItem("Scene Count In Build Settings:", SceneManager.sceneCountInBuildSettings.ToString());
  22. Scene activeScene = SceneManager.GetActiveScene();
  23. DrawItem("Active Scene Name:", activeScene.name);
  24. DrawItem("Active Scene Path:", activeScene.path);
  25. DrawItem("Active Scene Build Index:", activeScene.buildIndex.ToString());
  26. DrawItem("Active Scene Is Dirty:", activeScene.isDirty.ToString());
  27. DrawItem("Active Scene Is Loaded:", activeScene.isLoaded.ToString());
  28. DrawItem("Active Scene Root Count:", activeScene.rootCount.ToString());
  29. }
  30. GUILayout.EndVertical();
  31. }
  32. }
  33. }
  34. }