Coroutines in Enhanced Code Flow

The Enhanced Code Flow plugin is doing surprisingly well! During last 2 years it has been improved in many ways. It received many new functionalities, it works with Unreal Engine 5 too, it is more stable than ever and it has been used in multiple projects.

It's funny that everything have started because I wanted to have an equivalent of Delay Blueprint node in code. Now I can implement it in more elegant way than currently and all thanks to the fact, that Unreal Engine 5.3 fully supports C++20, which has coroutines!

What are coroutines? They are functions that can be suspended and resumed later. Sounds like a way to implement a Delay functionality? Oh yes!

FECFCoroutine UMyClass::SuspendableFunction()
{
    // Do something
    co_await FFlow::WaitSeconds(this, 2.f);
    // Do something after 2 seconds
}
Enhanced Code Flow received 3 new functions which utilize C++20 coroutines. They are experimental and probably not safe nor stable, but hey... this is just a first implementation.

More info, as usually, on the plugin's GitHub page.

If you want to implement coroutines into your Unreal Engine game you can also use this amazing plugin: UE5Coro.

Happy coding and watch out for next ECF updates!