The docs here state that running a Python script as a “Commandlet” (using -run=pythonscript -script=
- headless - vs -ExecutePythonScript=
, which brings up the Editor) is “very fast to execute, and can even run your scripts in headless mode without opening the Editor UI, but it can be trickier to load Levels and other kinds of Assets that your script needs to interact with.”. I am running into this “tricky” issue of loading Levels/Assets but can not seem to find any relevant docs of how to do it!
The key data is the error: “LogPython: Error: module ‘unreal’ has no attribute ‘EditorLevelLibrary’”. This answer here does not seem to be relevant since I have all the appropriate plugins installed.
How do I make unreal.EditorLevelLibrary...
available to Python scripts that are invoked in the Commandlet fashion so that I can load Levels/Assets? For context, I am just trying to import an asset here: unreal.EditorLevelLibrary.spawn_actor_from_object(obj, actor_location, actor_rotation)
.
Thanks!