I want to loop over particle systems in the Editor and collect stat gpu information. I have everything working except this line:
unreal.SystemLibrary.execute_console_command(unreal.EditorLevelLibrary.get_editor_world(), “stat gpu”)
The above line works if I manually type it into the editor, in the Python line of the Output Log. It works if I call it from within my .py script, manually imported through the Output Log window.
It will not work if I run it the way I need to run it, from the command line of a DOS shell, like this…
>C:…\UE4Editor-Cmd.exe “C:…\MyGame.uproject” -ExecutePythonScript=“C:…\MyPythonScript.py”
It does not error out. The “stat gpu” command is printed in the log, but the stat gpu command never actually gets successfully executed. I have stepped through the code several times and I can not tell what is going wrong.
How can I run a stat console command from within a python script that is passed into UE4Editor-Cmd.exe on the command line?
Any help appreciated.