Closed Acren closed 1 year ago
Hey there and thanks for the plugin, looks amazingly useful.
I'm trying to figure out how to await a coroutine from within another coroutine.
The docs seem to say this is possible here: https://github.com/landelare/ue5coro/blob/master/Docs/Async.md#other-coroutines However co_await doesn't appear to work on them in my tests on 1.6.2.
FAsyncCoroutine AMyActor::TestCoroOuter() { co_await TestCoroInner(); } FAsyncCoroutine AMyActor::TestCoroInner() { co_await UE5Coro::Latent::Seconds(1.0); }
[C2027] use of undefined type 'UE5Coro::Private::FAsyncAwaiter'
Is this the correct way of doing this? Are there any examples of this anywhere? Much thanks!
You're probably missing a #include. Either #include "UE5Coro/AsyncAwaiters.h" (where this type is) or make your life easier and #include "UE5Coro.h" to get everything.
#include "UE5Coro/AsyncAwaiters.h"
#include "UE5Coro.h"
That was it, thanks!
Hey there and thanks for the plugin, looks amazingly useful.
I'm trying to figure out how to await a coroutine from within another coroutine.
The docs seem to say this is possible here: https://github.com/landelare/ue5coro/blob/master/Docs/Async.md#other-coroutines However co_await doesn't appear to work on them in my tests on 1.6.2.
Is this the correct way of doing this? Are there any examples of this anywhere? Much thanks!