First commit
This commit is contained in:
38
Editor/EventManagerEditor.cs
Normal file
38
Editor/EventManagerEditor.cs
Normal file
@ -0,0 +1,38 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Agoxandr.Utils
|
||||
{
|
||||
[CustomEditor(typeof(EventManager), true)]
|
||||
public class EventManagerEditor : Editor
|
||||
{
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
EventManager myTarget = (EventManager)target;
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.Label("Update");
|
||||
if (Application.isPlaying)
|
||||
{
|
||||
GUILayout.FlexibleSpace();
|
||||
GUILayout.Label(myTarget.UpdateLength().ToString());
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.Label("FixedUpdate");
|
||||
if (Application.isPlaying)
|
||||
{
|
||||
GUILayout.FlexibleSpace();
|
||||
GUILayout.Label(myTarget.FixedUpdateLength().ToString());
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.Label("LateUpdate");
|
||||
if (Application.isPlaying)
|
||||
{
|
||||
GUILayout.FlexibleSpace();
|
||||
GUILayout.Label(myTarget.LateUpdateLength().ToString());
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user