This commit is contained in:
CortexCore
2024-12-25 11:11:31 +08:00
parent 0fddf0dc2a
commit 2c714da5b7
4 changed files with 29 additions and 4 deletions

View File

@@ -98,10 +98,18 @@ namespace BITKit
try
{
if(_isDisposed)return;
if (IsSyncContext)
{
await BITApp.SwitchToMainThread();
#if UNITY_EDITOR
if (UnityEditor.EditorApplication.isPaused)
{
_timer.Start();
return;
}
#endif
if(_isDisposed)return;
}
@@ -165,7 +173,9 @@ namespace BITKit
public void Dispose()
{
_isDisposed = true;
_timer.Stop();
_timer.Dispose();
}
}