TFuture<void > future=Async (EAsyncExecution::Thread, &]()
{
//run code in different thread
Async(EAsyncExecution::TaskGraphMainThread, &]
{
ChangeGameState(EGameStatus::GAMEPLAY);//callit on game thread
});
});
TFuture<void > future=Async (EAsyncExecution::Thread, &]()
{
//run code in different thread
Async(EAsyncExecution::TaskGraphMainThread, &]
{
ChangeGameState(EGameStatus::GAMEPLAY);//callit on game thread
});
});