Announcement

Collapse
No announcement yet.

Running Python Through the Command Line

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • started a topic Running Python Through the Command Line

    Running Python Through the Command Line

    When I try running my script using
    Code:
    UE4Editor-Cmd.exe -run=pythonscript -script="c:\my_script.py"
    I get the following error:

    I tried following the documentation here but had no luck: https://docs.unrealengine.com/en-US/...r-using-Python.

    Has anyone had any success running their python script from the command line?
    Attached Files

  • replied
    You need to enable the Python plugin for the engine to load by default.
    edit the PythonScriptPlugin.uplugin under "Engine\Plugins\Experimental\PythonScriptPlugin" and change the following to
    "EnabledByDefault" : true,

    Once you do that the "pythonscript" commandlet will load.

    Update: You will also want to enable the EditorScriptingUtilities plugin by default as well...to get access to things like "unreal.EditorAssetLibrary"
    "Engine\Plugins\Editor\EditorScriptingUtilities\EditorScriptingUtilities.uplugin" and change "EnabledByDefault" : true,
    Last edited by cgsquirrel2; 12-07-2018, 03:20 PM.

    Leave a comment:


  • replied
    same problem

    Leave a comment:

Working...
X