Use quitting instead of on application quit.
This commit is contained in:
@@ -4,6 +4,16 @@ namespace Utils
|
||||
{
|
||||
public class EventManager : MonoBehaviour
|
||||
{
|
||||
private void Awake()
|
||||
{
|
||||
Application.quitting += OnQuitting;
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
Application.quitting -= OnQuitting;
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
App.InvokeEarlyUpdate();
|
||||
@@ -16,7 +26,7 @@ namespace Utils
|
||||
App.InvokeLastUpdate();
|
||||
}
|
||||
|
||||
private void OnApplicationQuit()
|
||||
private void OnQuitting()
|
||||
{
|
||||
App.ClearUpdate();
|
||||
App.ClearLateUpdate();
|
||||
|
||||
@@ -4,12 +4,22 @@ namespace Utils
|
||||
{
|
||||
public class PhysicsEventManager : MonoBehaviour
|
||||
{
|
||||
private void Awake()
|
||||
{
|
||||
Application.quitting += OnQuitting;
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
Application.quitting -= OnQuitting;
|
||||
}
|
||||
|
||||
private void FixedUpdate()
|
||||
{
|
||||
App.InvokeFixedUpdate();
|
||||
}
|
||||
|
||||
private void OnApplicationQuit()
|
||||
private void OnQuitting()
|
||||
{
|
||||
App.ClearFixedUpdate();
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ru.shazbot.utils",
|
||||
"version": "7.0.0",
|
||||
"version": "7.0.1",
|
||||
"displayName": "Utils",
|
||||
"description": "Utility useful for almost any project.",
|
||||
"licensesUrl": "https://git.shazbot.ru/shazbot/Utils/src/LICENSE.md",
|
||||
|
||||
Reference in New Issue
Block a user