Hello. Im trying to make UEngine::Browse() from one map to another, when client disconnected fromn the server (the same behavior as in ShooterGame). But after different calls the engine comes to void FPhysScene::WaitPhysScenes() and is freeze inside because of FTaskGraphInterface::Get().WaitUntilTasksComplete(ThingsToComplete, ENamedThreads::GameThread);
I created empty test project, with nothing but just two empty maps - still the same problem. I know, that it is not the bug, because the same works good in ShooterGame, so maybe I missed some setting?
For tests I use console command "PathToTheEditor" "PathToTheGame" -log -game
I figured out, what was the problem, but it will be good, if someone can explain it to me.
UEngine::Browse() can’t be called directly from any places, because in the end it does sort of hard reset for everything, but game thread remains executing some task, so engine runs infinite waiting for game thread to finish this task before browse can me complete.
Good way to use it - is the same way as in ShooterGame. Instead of call UEngine::Browse() you should change state for GameInstance (since it is singleton and lives during whole game run). And GameInstance should check state and call Browse() by himself, this trick avoids game thread to remain executing some task, and trevelling to the new map works good.
If this is not the bug, this behaviour should be added to documentation, Epic guys!