hi! i’m trying to load several selected levels in CB in a loop with python, and i’m experiencing constant crashes on loading the second item. The first level loads successfully, but the second attempt - crashes… Why does this happening?
import unreal
@unreal.uclass()
class MyEditorUtility(unreal.GlobalEditorUtilityBase):
pass
editor_util = MyEditorUtility()
levels = editor_util.get_selected_assets()
for level in levels:
unreal.EditorLevelLibrary.load_level(level.get_path_name())
unreal.EditorLevelLibrary.save_all_dirty_levels()
# unreal.EditorAssetLibrary.save_loaded_asset(level)