Love your library!
Say you have some code like this:
async void Start()
{
await Await.Seconds(5).ConfigureAwait(this);
transform.position = new Vector3(1, 2, 3); // will crash if object was destroyed
}
Currently, if the GameObject or Component is destroyed, the continuation runs immediately, which would cause a crash. I think it would be more intuitive if the continuation were cancelled instead. This is probably what the user wants most of the time and is consistent with how coroutines work.
Love your library!
Say you have some code like this:
Currently, if the GameObject or Component is destroyed, the continuation runs immediately, which would cause a crash. I think it would be more intuitive if the continuation were cancelled instead. This is probably what the user wants most of the time and is consistent with how coroutines work.