1234567891011121314151617181920212223242526272829303132333435363738394041 |
- //------------------------------------------------------------
- // Game Framework
- // Copyright © 2013-2021 loyalsoft. All rights reserved.
- // Homepage: http://www.game7000.com/
- // Feedback: http://www.game7000.com/
- //------------------------------------------------------------
- using UnityEditor;
- using UnityGameFramework.Runtime;
- namespace UnityGameFramework.Editor
- {
- [CustomEditor(typeof(EventComponent))]
- internal sealed class EventComponentInspector : GameFrameworkInspector
- {
- 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();
- }
- private void OnEnable()
- {
- }
- }
- }
|