Download

Launching UE4 editor headless and running Python

Hello,

I’m making a plugin and I need to open another UE4 project via CMD from within UE4.

I’ve setup my blueprint to run the console command described in the docs but nothing seems to happen when the command is run. The command goes green so I’m assuming it runs without any errors.

Here is the command I’m running


UE4Editor-Cmd.exe "Path\To\My\.uproject" -run=pythonscript -script="Path\To\My	est.py"

I’ve also ran the same command with the full path to my UE4Editor.exe and the UE4Editor-Cmd.exe but nothing changes.

Once the editor opens in headless/or editor mode my specified python file should run. The python file is just doing a simple print so it should run when the editor is loaded. So far the task manager is not showing any additional UE4 editors opening when the console is run.

I’ve attached a screenshot of the console command turning green when its ran via the blueprint. I’ve also had the same result from typing it manually.

If someone could help me out with how to get the editor to load and run some basic python files I would be very grateful! I can see the potential for how powerful headless mode can be but I just can’t get it to work :frowning: Ideally I want the editor to launch in the background and then run some python, but just getting a new editor to load would be a step in the right direction.

Thanks in advance,

Rob

Correct command screenshot*