You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The main reason I suggest this is due to how native C# tasks continue to execute in the editor even after you exit play mode. The UniTask library implements tasks to run against the Unity update loop meaning tasks will be ignored once you exit play mode.
You can experience what I am referring to by executing a HTTPRequest using WaitForResponseAsync on an endpoint you know will take a few seconds and then exit play mode.
Or just run this in the editor...
publicclassTest:MonoBehaviour{privatevoidStart(){
Run();
Application.Quit();}privateasyncvoidRun(){await Task.Delay(5000);
Debug.Log("Stuff happened outside play mode");}}
The text was updated successfully, but these errors were encountered:
Library in question: https://github.com/Cysharp/UniTask
The main reason I suggest this is due to how native C# tasks continue to execute in the editor even after you exit play mode. The
UniTask
library implements tasks to run against the Unity update loop meaning tasks will be ignored once you exit play mode.You can experience what I am referring to by executing a
HTTPRequest
usingWaitForResponseAsync
on an endpoint you know will take a few seconds and then exit play mode.Or just run this in the editor...
The text was updated successfully, but these errors were encountered: