33 lines
864 B
C#
33 lines
864 B
C#
using Axibug.Editor;
|
|
using Axibug.Runtime;
|
|
using UnityEditor;
|
|
|
|
|
|
namespace UnityGameFramework.Editor
|
|
{
|
|
[CustomEditor(typeof(EventComponent))]
|
|
internal sealed class EventComponentInspector : GameInspector
|
|
{
|
|
public override void OnInspectorGUI()
|
|
{
|
|
base.OnInspectorGUI();
|
|
|
|
if (!EditorApplication.isPlaying)
|
|
{
|
|
EditorGUILayout.HelpBox("Available during runtime only.", MessageType.Info);
|
|
return;
|
|
}
|
|
|
|
EventComponent t = (EventComponent)target;
|
|
|
|
if (IsPrefabInHierarchy(t.gameObject))
|
|
{
|
|
EditorGUILayout.LabelField("Event Handler Count", t.EventHandlerCount.ToString());
|
|
EditorGUILayout.LabelField("Event Count", t.EventCount.ToString());
|
|
}
|
|
|
|
Repaint();
|
|
}
|
|
}
|
|
}
|