When I restart level in editor everything reloads almost instantly. But in game it apparently unloads everything (makes sense if you want to load a completely different level) and then reloads everything again and that takes a while.
Is it possible to make the restart faster - similar to how it works in editor? Do I have to modify the engine source to do it?
This is a PC game btw so RAM isn’t an issue. Fast load times are far more important than RAM usage.
I haven’t tried it myself, but I think you can shorten the load time by using the LoadAsset blueprint node to pre-load the level and keep a reference to it stored somewhere so it doesn’t get garbage collected (somewhere that survives across levels, like your GameInstance class).
.umap is basically just a container of assets with their location and properties. The main load-time is spend for loading textures and logic into the memory, which can be reduced by the technique manoelneto suggested.
I remember that being mentioned on slack…I think Matheww did a tutorial about it and eXi went on and evaluated it further: https://youtube.com/watch?v=LseY59ffKK8But you need to implement that on every actor
Resetting everything “manually” can be really nasty and can lead to incredible hard to find bugs when you miss just one variable somewhere, but of course, with the right discipline it’s possible
That’s not very useful. It doesn’t delete any actors that have been spawned (except the player character). I want to completely reset the level. RestartGame does that, but it works the way I want only in editor.