123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- //------------------------------------------------------------
- // Game Framework
- // Copyright © 2013-2021 loyalsoft. All rights reserved.
- // Homepage: http://www.game7000.com/
- // Feedback: http://www.game7000.com/
- //------------------------------------------------------------
- using UnityEngine;
- namespace UnityGameFramework.Runtime
- {
- public sealed partial class DebuggerComponent : GameFrameworkComponent
- {
- private sealed class OperationsWindow : ScrollableDebuggerWindowBase
- {
- protected override void OnDrawScrollableWindow()
- {
- GUILayout.Label("<b>Operations</b>");
- GUILayout.BeginVertical("box");
- {
- ObjectPoolComponent objectPoolComponent = GameEntry.GetComponent<ObjectPoolComponent>();
- if (objectPoolComponent != null)
- {
- if (GUILayout.Button("Object Pool Release", GUILayout.Height(30f)))
- {
- objectPoolComponent.Release();
- }
- if (GUILayout.Button("Object Pool Release All Unused", GUILayout.Height(30f)))
- {
- objectPoolComponent.ReleaseAllUnused();
- }
- }
- ResourceComponent resourceCompoent = GameEntry.GetComponent<ResourceComponent>();
- if (resourceCompoent != null)
- {
- if (GUILayout.Button("Unload Unused Assets", GUILayout.Height(30f)))
- {
- resourceCompoent.ForceUnloadUnusedAssets(false);
- }
- if (GUILayout.Button("Unload Unused Assets and Garbage Collect", GUILayout.Height(30f)))
- {
- resourceCompoent.ForceUnloadUnusedAssets(true);
- }
- }
- if (GUILayout.Button("Shutdown Game Framework (None)", GUILayout.Height(30f)))
- {
- GameEntry.Shutdown(ShutdownType.None);
- }
- if (GUILayout.Button("Shutdown Game Framework (Restart)", GUILayout.Height(30f)))
- {
- GameEntry.Shutdown(ShutdownType.Restart);
- }
- if (GUILayout.Button("Shutdown Game Framework (Quit)", GUILayout.Height(30f)))
- {
- GameEntry.Shutdown(ShutdownType.Quit);
- }
- }
- GUILayout.EndVertical();
- }
- }
- }
- }
|