Skip to content

Commit

Permalink
Consume enumerators for types inheriting AsyncOperation. neuecc#516
Browse files Browse the repository at this point in the history
  • Loading branch information
zudl committed Apr 3, 2023
1 parent 756506e commit fcf0595
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ void ConsumeEnumerator(IEnumerator routine)
#if UNITY_2018_3_OR_NEWER
#pragma warning restore CS0618
#endif
else if (type == typeof(AsyncOperation))
else if (typeof(AsyncOperation).IsAssignableFrom(type))
{
var asyncOperation = (AsyncOperation)current;
editorQueueWorker.Enqueue(_ => ConsumeEnumerator(UnwrapWaitAsyncOperation(asyncOperation, routine)), null);
Expand Down

0 comments on commit fcf0595

Please sign in to comment.