Update
This commit is contained in:
parent
963d166bff
commit
029e02fd2f
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Agoxandr.Utils.Editor",
|
||||
"rootNamespace": "",
|
||||
"rootNamespace": "Utils",
|
||||
"references": [
|
||||
"GUID:80ed647da8ce73c45b66c239eba0365a"
|
||||
],
|
@ -8,13 +8,13 @@ namespace Utils
|
||||
{
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
EventManager eventManager = (EventManager)target;
|
||||
var eventManager = (EventManager)target;
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.Label("Update");
|
||||
if (Application.isPlaying)
|
||||
{
|
||||
GUILayout.FlexibleSpace();
|
||||
GUILayout.Label(eventManager.UpdateLength.ToString());
|
||||
GUILayout.Label(EventManager.UpdateLength.ToString());
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
GUILayout.BeginHorizontal();
|
||||
@ -22,7 +22,7 @@ namespace Utils
|
||||
if (Application.isPlaying)
|
||||
{
|
||||
GUILayout.FlexibleSpace();
|
||||
GUILayout.Label(eventManager.FixedUpdateLength.ToString());
|
||||
GUILayout.Label(EventManager.FixedUpdateLength.ToString());
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
GUILayout.BeginHorizontal();
|
||||
@ -30,7 +30,7 @@ namespace Utils
|
||||
if (Application.isPlaying)
|
||||
{
|
||||
GUILayout.FlexibleSpace();
|
||||
GUILayout.Label(eventManager.LateUpdateLength.ToString());
|
||||
GUILayout.Label(EventManager.LateUpdateLength.ToString());
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
{
|
||||
"name": "Agoxandr.Utils",
|
||||
"rootNamespace": "Utils",
|
||||
"references": [],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
@ -9,8 +9,8 @@ namespace Utils
|
||||
return new T[] { item };
|
||||
}
|
||||
|
||||
T[] result = new T[array.Length + 1];
|
||||
for (int i = 0; i < array.Length; i++)
|
||||
var result = new T[array.Length + 1];
|
||||
for (var i = 0; i < array.Length; i++)
|
||||
{
|
||||
result[i] = array[i];
|
||||
}
|
||||
|
@ -28,51 +28,30 @@ namespace Utils
|
||||
OnLateUpdated?.Invoke();
|
||||
}
|
||||
|
||||
public int UpdateLength
|
||||
public static int UpdateLength
|
||||
{
|
||||
get
|
||||
{
|
||||
var list = OnUpdated?.GetInvocationList();
|
||||
if (list != null)
|
||||
{
|
||||
return list.Length;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return list?.Length ?? 0;
|
||||
}
|
||||
}
|
||||
|
||||
public int FixedUpdateLength
|
||||
public static int FixedUpdateLength
|
||||
{
|
||||
get
|
||||
{
|
||||
var list = OnFixedUpdated?.GetInvocationList();
|
||||
if (list != null)
|
||||
{
|
||||
return list.Length;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return list?.Length ?? 0;
|
||||
}
|
||||
}
|
||||
|
||||
public int LateUpdateLength
|
||||
public static int LateUpdateLength
|
||||
{
|
||||
get
|
||||
{
|
||||
var list = OnLateUpdated?.GetInvocationList();
|
||||
if (list != null)
|
||||
{
|
||||
return list.Length;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return list?.Length ?? 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cyou.shazbot.utils",
|
||||
"version": "3.0.0",
|
||||
"version": "3.0.1",
|
||||
"displayName": "Utils",
|
||||
"description": "Utility useful for almost any project.",
|
||||
"licensesUrl": "https://github.com/Agoxandr/Utils/blob/master/LICENSE.md",
|
||||
@ -11,5 +11,8 @@
|
||||
"name": "Alexander Filippov",
|
||||
"email": "a.filippov@shazbot.cyou",
|
||||
"url": "https://shazbot.cyou/"
|
||||
},
|
||||
"dependencies": {
|
||||
"com.unity.modules.physics": "1.0.0"
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user