I want to load/unload tiles in a world composition called from a blutility function in editor mode (not ingame). In the picture below you can see the contextmenu for load/unload tiles. I want the same functionality via a blueprint function.
âLoadLevelâ does work ingame but not in editor mode called from a blutility function.
âLoadLevelEditorâ does not work at all and gives the error âLogLevel: Warning: Failed to find streaming level object associated with âsub1ââ
Is there any way to achieve the same result as clicking Load/Unload in the contextmenu?
UGameplayStatics class is meant for runtime code.
If youâd like to manage levels in the editor, you need EditorLevelUtils.
In my implementation, I keep an array of level names in the form of presets, so the user can easily switch between level presets. Then I retrieve ULevelStreaming* from the world (method in custom World Settings) and pass it to EditorLevelUtils methods.
I know this is super late, but I was also looking into this, for another reason by means of a c++ plugin.
And I found you can do it using the following.
I know this is super late, but I was also looking for this in c++ via plugin for another reason, and finally managed to get it working, so answering here for prosperity.
You need to include âWorldBrowserâ module.
And the following headers:
You should then be able to expose this to blueprint as static functions or example. I can not find any existing pre exposed blueprint functionality other than a lot of custom slate widgets *( the world composition widgets as it happens, uses this same method to load/unload levels )