How is it possible to load new 3D level without recreating HUD, GameMode e.t.c.
Currently when I do, GetWorld()->ServerTravel(…)
all my customization flies away.
And question related to above, can you hint me a place in C++ code where I can put my init/deinit code and which will be guaranteed to be called once at game startup and shutdown. I keep global variable as a last resort, I would love to avoid it.
I don’t have a good context on what you’re trying to achieve. But from what you said maybe you could use level streaming?
The Level Streaming feature makes it possible to load and unload map files into memory as well as toggle their visibility all during play. This makes it possible to have worlds broken up into smaller chunks so that only the relevant parts of the world are taking up resources and being rendered at any point. If done properly, this allows for the creation of very large, seamless levels that can make the player feel as if they are playing within a world that dwarfs them in size.