I’m trying to load a sublevel into the current level in python, but I don’t know how.
I found this article and tried it, but I get the following error message.
world = unreal.EditorLevelLibrary.get_editor_world()
levelStreaming = unreal.EditorLevelUtils().add_level_to_world_transform(world, subLevelPath , unreal.LevelStreamingAlwaysLoaded)
error:
LogPython: Error: ‘EditorLevelUtils’ object has no attribute ‘add_level_to_world’
It seems that this function is new in 4.26.
Is there any way to load it in 4.25?
Reference:
https://docs.unrealengine.com/en-US/PythonAPI/class/EditorLevelUtils.html