#Hello, I am trying to get the Unity
1 messages · Page 1 of 1 (latest)
a common assumption is that await will block the next Update . It only blocks the current one.
If you check this code:
async void Update()
{
Debug.Log("Hello");
await Task.Delay(1000);
Debug.Log("Done");
}
You'll see hello will be called many times before the "done". Despite that you might assume the delay would mean that a new Update would not be called until the last one finished.
You need to use state machines (bools, enums) to check whether the call should be made or not.
This might cause your method to be called more times than you expect