This commit is contained in:
CortexCore
2024-05-31 01:23:15 +08:00
parent c798b224be
commit 299082fe27
164 changed files with 3604 additions and 2018 deletions

View File

@@ -234,6 +234,7 @@ namespace BITKit.SceneManagement
public async UniTask UnloadSceneAsync(string sceneName, CancellationToken cancellationToken)
{
await UniTask.SwitchToMainThread();
OnUnloadScene?.Invoke(sceneName);
await Task.Delay(100, destroyCancellationToken);
@@ -246,7 +247,7 @@ namespace BITKit.SceneManagement
SceneManager.LoadScene(1);
destroyCancellationToken.ThrowIfCancellationRequested();
await UniTask.SwitchToMainThread();
OnSceneUnloaded?.Invoke(sceneName);
}