I’m trying to run a python script using UnrealEditor-Cmd.exe, following this document:
official documents
it says:
This commandlet does not automatically load levels, so when writing your script, add the following line as the first thing it does:
unreal.get_editor_subsystem(unreal.LevelEditorSubsystem).load_level("/Game/maps/UVlayoutTest.UVlayoutTest")
I followed the instruction, but when I run the script in command line, it generated a ue crash window:
I’m sure the level path is correct, I tried both these paths, none of them works
load_level('/Game/Scene/Triangulation.Triangulation')
load_level('/Game/Scene/Triangulation')
the error :
[2024.12.26-13.13.27:836][ 0]LogPythonScriptCommandlet: Display: Running Python script: D:\Dev\UEProjects\UtilityScripts\GetSceneInfo.py
[2024.12.26-13.13.29:876][ 0]LogStaticMesh: Display: Building static mesh StaticMesh_0 (Required Memory Estimate: 0.00765 MB)...
[2024.12.26-13.13.29:892][ 0]LogStaticMesh: Display: Building static mesh StaticMesh_1 (Required Memory Estimate: 0.056971 MB)...
[2024.12.26-13.13.29:924][ 0]LogOutputDevice: Warning:
Script Stack (1 frames) :
/Script/LevelEditor.LevelEditorSubsystem.LoadLevel
[2024.12.26-13.13.29:931][ 0]LogWindows: Error: appError called: Assertion failed: IsValid() [File:D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Public\Templates\SharedPointer.h] [Line: 1102]
......