Command-line export¶
UE2GD can export without opening the editor, for automation and build scripts:
UnrealEditor-Cmd.exe MyProject.uproject -run=pythonscript -script="<plugin>/Content/Python/ue2godot_cli.py" -AllowCommandletRendering
-AllowCommandletRendering is required. UE2GD bakes materials and renders landscapes with Unreal's renderer, and
a commandlet leaves the renderer off unless asked. Don't add -nullrhi. Without the renderer, the export stops
with a message saying what to add.
Pass the options as JSON in the UE2GODOT_ARGS environment variable. Then open the project in Godot, or run the
generated ue2godot/_cache/build_<Level>.bat.
A level¶
{"level": "/Game/Maps/MyLevel", "export_into": "NEW_PROJECT", "project_folder": "D:/Godot"}
Add "include_skeletal_meshes": true to export the level's skeletal meshes too (Experimental).
Skeletal meshes on their own (Experimental)¶
{"skeletal_meshes": ["/Game/Characters/SKM_Hero"], "project_folder": "D:/Godot", "bone_map": "UE5_MANNEQUIN"}
bone_map is UE5_MANNEQUIN, CUSTOM (with "custom_bone_map": "<path to .tres>") or NONE.
Memory¶
On the first export, Unreal starts one shader compiler per CPU thread, and each one needs memory. If memory runs short, add this to the command line:
"-ini:Engine:[DevOptions.Shaders]:NumUnusedShaderCompilingThreads=24"
On a 32-thread CPU that leaves 8 compilers. It applies to that run only.