Added early update event.

This commit is contained in:
2023-12-16 16:32:47 +01:00
parent 8dcb16073c
commit 5991e60e7a
3 changed files with 23 additions and 1 deletions

View File

@ -12,9 +12,14 @@ namespace Utils
public delegate void LateUpdateAction();
public static event LateUpdateAction LateUpdated;
public delegate void EarlyUpdateAction();
public static event EarlyUpdateAction EarlyUpdated;
private void Update()
{
EarlyUpdated?.Invoke();
Updated?.Invoke();
}
@ -54,5 +59,14 @@ namespace Utils
return list?.Length ?? 0;
}
}
public static int EarlyUpdateLength
{
get
{
var list = EarlyUpdated?.GetInvocationList();
return list?.Length ?? 0;
}
}
}
}