47 lines
1.5 KiB
C#
47 lines
1.5 KiB
C#
using UnityEditor;
|
|
using UnityEngine;
|
|
|
|
namespace Utils
|
|
{
|
|
[CustomEditor(typeof(EventManager), true)]
|
|
public class EventManagerEditor : Editor
|
|
{
|
|
public override void OnInspectorGUI()
|
|
{
|
|
var eventManager = (EventManager)target;
|
|
GUILayout.BeginHorizontal();
|
|
GUILayout.Label("Update");
|
|
if (Application.isPlaying)
|
|
{
|
|
GUILayout.FlexibleSpace();
|
|
GUILayout.Label(EventManager.UpdateLength.ToString());
|
|
}
|
|
GUILayout.EndHorizontal();
|
|
GUILayout.BeginHorizontal();
|
|
GUILayout.Label("FixedUpdate");
|
|
if (Application.isPlaying)
|
|
{
|
|
GUILayout.FlexibleSpace();
|
|
GUILayout.Label(EventManager.FixedUpdateLength.ToString());
|
|
}
|
|
GUILayout.EndHorizontal();
|
|
GUILayout.BeginHorizontal();
|
|
GUILayout.Label("LateUpdate");
|
|
if (Application.isPlaying)
|
|
{
|
|
GUILayout.FlexibleSpace();
|
|
GUILayout.Label(EventManager.LateUpdateLength.ToString());
|
|
}
|
|
GUILayout.EndHorizontal();
|
|
GUILayout.BeginHorizontal();
|
|
GUILayout.Label("EarlyUpdate");
|
|
if (Application.isPlaying)
|
|
{
|
|
GUILayout.FlexibleSpace();
|
|
GUILayout.Label(EventManager.EarlyUpdateLength.ToString());
|
|
}
|
|
GUILayout.EndHorizontal();
|
|
}
|
|
}
|
|
}
|