mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
Update
Update
This commit is contained in:
@@ -1,41 +0,0 @@
|
|||||||
using TEngine.Runtime;
|
|
||||||
using UnityEditor;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace TEngine.Editor
|
|
||||||
{
|
|
||||||
[CustomEditor(typeof(GameObjectPoolManager))]
|
|
||||||
internal sealed class ObjectPoolManagerInspector : TEngineInspector
|
|
||||||
{
|
|
||||||
public override void OnInspectorGUI()
|
|
||||||
{
|
|
||||||
if (!EditorApplication.isPlaying)
|
|
||||||
{
|
|
||||||
EditorGUILayout.HelpBox("Available during runtime only.", MessageType.Info);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (GameObjectPoolManager.Instance.Helper.ObjectPools.Count == 0)
|
|
||||||
{
|
|
||||||
GUILayout.BeginHorizontal();
|
|
||||||
GUILayout.Label("No Runtime Data!");
|
|
||||||
GUILayout.EndHorizontal();
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (var pool in GameObjectPoolManager.Instance.Helper.ObjectPools)
|
|
||||||
{
|
|
||||||
GUILayout.BeginHorizontal();
|
|
||||||
GUILayout.Space(20);
|
|
||||||
GUILayout.Label(pool.Key + ": " + pool.Value.Count);
|
|
||||||
GUILayout.FlexibleSpace();
|
|
||||||
GUI.enabled = pool.Value.Count > 0;
|
|
||||||
if (GUILayout.Button("Clear", EditorStyles.miniButton))
|
|
||||||
{
|
|
||||||
pool.Value.Clear();
|
|
||||||
}
|
|
||||||
GUI.enabled = true;
|
|
||||||
GUILayout.EndHorizontal();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: a49fa7335fa305d4bbef4478b39ed39a
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
Reference in New Issue
Block a user