Closed DavidCampbellIII closed 6 months ago
This is the intended behavior. If you want cancellation to spread or cancel a set of coroutines, you'll need to implement that yourself.
Interacting with the latent action manager to remove the latent actions is supported: latent coroutines do their best to behave exactly like BP latent actions would, given the limitations imposed by C++.
all the equivalent things Unity's IEnumerator could handle.
As a side note, this is an explicit anti-goal of this library. Other Unreal coroutine libraries exist whose design is closer to the Unity iterator hack.
Got it, thanks for the response!
Excuse my ignorance, but doesn't this project accomplish fundamentally the same thing that Unitys IEnumerators do?
This project certainly features a more rich feature set compared to that of Unity, which is awesome, but everything I'm used to doing in Unity was easily achieved with this project, excluding the cascading cancelations of nested coroutines.
If you're able to point out any other projects that are more closely emulating Unitys way of doing things, I'd greatly appreciate it! All my own searches have lead me back to this project, as nothing else even came close.
Thanks again!
No, it mainly wants to bring async/await into Unreal. There's a fundamental inversion of ownership and control between the two: an iterator(C#)/generator(C++) is controlled by its caller and relies on its "polling" (MoveNext() in .NET land) to continue, while an async method is expected to run independently.
Hello! Love this plugin, trying to get it to do all the equivalent things Unity's IEnumerator could handle.
I've got just about everything figured out except for canceling a latent coroutine that itself awaits other coroutines.
This was a test to determine the behavior of nested coroutines after the parent coroutine is canceled. It appears that even after WaitParent is canceled, WaitChild will continue to run, calling WaitNested.
Example output:
Is this expected behavior, or am I doing something wrong? The only alternative I can think of is to just cancel all the coroutines on the object using:
however I'd like the ability to only cancel 1 "set" instead of everything on the object if possible.
Thank you in advance! 😊