This node / C++ function allows you to easily create multiple instances of the same .umap within your main level, without having to add the levels to the persistent maps level’s list!
This is ideal for dynamic world generation composed of “tiles” of existing .umaps.
I could have made this into a plugin to sell on marketplace but I decided it was too important to not give to the whole world as part of the engine
**Wiki on Adding Additional UAssets or Custom Files to Your Packaged Build**
**I have a wiki on adding non-uasset or uasset/umap files to your cooked build here:**
https://wiki.unrealengine.com/How_To_Package_Extra_NonUASSET_Files_With_Your_Game
For anyone needing help ensuring that umaps package with their game (for any reason) here are two methods you can use!
Manually specify maps to include in packaged game
**You can also add an entire folder of UE4 assets/umaps if you want to!**
Use "**Additional Assets to Cook**" for .umaps!
![b8c038088d5377cec93cf000bc8cfcde3f2d2c34.jpeg|1116x667](upload://qmnGg7SGI2zF6leen7iTDRiqFHS.jpeg)
This is simply a great feature must be added to the engine! Especially because runtime landscape deformation is not provided by Epic, it gives an opportunity to create random maps from pieces.
Hopefully it would be an essential part of my WIP game…
Is it a convenience node or does it add functionality?
i.e. is there any benefit to this approach other than not needing to drag the levels to the Levels list?
Tried it with 4.13, but am getting a terrible performance using the node.
With “Get Streaming Level” + “Create Instance” my test setup runs at 120fps/8ms,
whereas when I replace it with the new “Load Level Instance” node, it dropps to 5fps/200ms.
Any ideas what could be causing this?
Edit: performance drop was due to me not providing the directory of the level, just the name (it still did find the level). Works fine now.
Landscape shader deformation is now fast enough to use actually, although that doesn’t give you a collision solution and it only applies to nearby tiles.
This is a pretty great feature, and I’m very excited to play around with it. That being said, it seems that the node is only callable from the Level Blueprint. The LoadLevelInstance function is not callable from C++ because ULevelStreamingKismet is MinimalAPI and the function was not marked for export. I’m not familiar with how Level Streaming works under the hood, but could it be possible to call this function elsewhere other than the level blueprint?
Like ALWAYS, when I post a question to the Forums or the Answer hub, I figured out the solution immediately after posting:
There are a couple Boolean Variables associated with the Loaded Map Instance, one is Should Be Loaded, setting this to false seems to unload the level. I’m not sure if it actually does, because I can set the Boolean back to True and the level reappears. My test levels are pretty small so I can’t really tell if it’s unloading everything correctly.
Hi , thank you for providing this, it’s been a very useful function so far.
Would you have any advice on how to modify the implementation so that it would take into account the “local” offset of tiled maps that are encompassed in a level that has world composition enabled?
Each of the sub-levels here will have an offset that’s stored somewhere by the engine, however your function mandates a location & rotation as parameters. What I’d like to do is have it take the sub-levels, check their offsets in world composition & apply that automatically upon loading. I have come up with workarounds already but feel that a native approach would be more efficient.
Any thoughts welcome, and thanks again for making this available in the first place!
Dear community!
Thank you for this awesome function!
But, can somebody please make another one to unload this levels?
It will be really useful, cause on the moment, there is no simple solution to do unloading.
The function returns “level streaming kismet object reference”.
I think it would be cool to have a way to remove the level by specifying a function on it with this reference.
Thank you for your attention.
Not sure this is the right place to ask, but does anyone know what information one can get from a level before loading it?
Could you possibly get the bounds somehow?
And this is probably way out of scope, but say if you have an L-shaped level… what would be the strategy to Tetris fit it into what you’ve already loaded?