1.6
TL;DR: coroutines and awaiters that aren't latent actions will ignore pause by default, unless respecting it makes more sense. Numerous new template and non-template async loading awaiters were added, and their co_await results are now more reliable.
This release mostly focuses on unifying async C++ behavior in various situations that aren't handled that clearly by the engine itself. Overall, the changes bring async behavior closer to what you would expect to see in a C++ program outside Unreal Engine and work better with language facilities such as RAII.
This results in multiple technically-breaking changes, but hopefully, most of them will change towards being more predictable and comfortable to use rather than the opposite.
- Latent mode coroutines continue to respect their caller's tick-while-pause setting, exactly like BP latent nodes do. This hasn't changed.
- Async mode coroutines themselves have always ignored pause; however they could await latent actions that respected it. Callees will now ignore pause when co_awaited from a non-latent async coroutine.
This makes RealSeconds, RealTimeline, AsyncLoad, etc., more convenient to use as they won't get "stuck" until the game is unpaused. - Latent::Chain and ChainEx now always ignore pause.
- Latent::UnpausedTimeline and RealTimeline now tick while paused, even if called from a latent mode coroutine that respects pause. They've received a new parameter to respect pause instead.
- Latent::Timeline and AudioTimeline continue to respect pause, but this is now opt-out with a new parameter. If opted out, the provided function will be called with the same Alpha value since the underlying world times still respect pause.
Async loading received substantial changes and additions:
- Numerous new functions and overloads were added for typed/untyped, scalar/array, primary asset/soft pointer, etc.
- As a rule of thumb, if there's a templated and non-templated AsyncLoadSomething, the templated one will provide the loaded objects as the result when co_awaited, while the non-templated one will skip this step. (async class loading being an exception)
- These functions now take a Priority parameter for extra control over loading.
- Bugfix: the co_awaited results now more reliably and consistently match the functions' input parameters. A workaround that the engine's own async loading BP nodes use is performed internally; expect results consistent with those nodes.
Additional changes:
- Latent::Chain and ChainEx will now resume the calling coroutine even if the chained latent action is canceled. Previously, canceled latent actions would simply abandon their caller (which remains the engine's built-in BP behavior).
- co_awaiting Latent::Chain/ChainEx now results in a bool: true if the chained coroutine finished normally (e.g., it called FLatentResponse::FinishAndTriggerIf) and false if it didn't.
- A few memory management bugs were fixed in the plugin itself that were triggered by unusual Latent::Chain usages (such as not co_awaiting the result and the latent action getting canceled).
- Latent::Frames was removed entirely.