Proper use of UEngine::Browse() to open map
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
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
If it can help, I can provide my test project.
Thanks for any help!
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!
answered Dec 06 '18 at 11:30 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here