Code Monkey home page Code Monkey logo

ue4-orchestrator's Introduction

UE4-Orchestrator

An unreal engine plugin with an embedded HTTP server to do your bidding.

Install

Install this plugin like any other UE4 plugin. Once this is done, the plugin will host a HTTP server at port 18820.

HTTP GET Endpoints

All these endpoints will trigger the subsequent functionality in the engine. There is never a request body expected, and only the 200 status code indicates a success.

Endpoint Description
/play Trigger a play in the current level
/stop Stop playback
/shutdown Shutdown the UE4 editor
/build Trigger a build in the editor
/is_building Returns TRUE if the editor is currently building
/list_assets List all assets registered with the asset registry module
/assets_idle Returns OK if the asset importer is idle, returns TRY_AGAIN otherwise
/debug Calls the debugFn() used for experimentation

HTTP POST Endpoints

Endpoint Description
/command Execute a console command in the editor
/loadpak Load a pakfile

POST /command

Post body is expected to be a string. The body is passed directly to the UE4 editor console where it is Exec'd.

Example: Run a python script in the scripts dir called foo.py with arguments a, b and 42:

echo "py.exec_args foo.py a b 42" | http POST localhost:18820/command

Example: Run a random UE4 engine console command:

echo "showfps" | http POST localhost:18820/command

POST /loadpak

Post body is expected to be a comma-separated-string. The first element is the path in the local file-system to the .pak file we wish to mount, and the second argument is the mount path.

Eample: Mount /tmp/foo.pak into /Content/Import/02843684:

echo /tmp/foo.pak,/Content/Import/02843684 | http POST localhost:18820/loadpak

The /loadpak endpoint will also accept HTTP POST payloads with JSON where the following keys are expected to live:

{
    pak_path: <...>,        // Path to pak file in the local system
    mount_point: <...>,     // Game mount point
}

The JSON deserializer is attempted first, failing which the payload is checked against the csv scheme.

Detailed usage example

Import Shapenet class 00000001 from /tmp/shapenet/ into /Game/Import and generate /tmp/output.pak:

echo "py.exec_args import_fbx.py import_shapenet /tmp/shapenet/ 00000001" | http POST localhost:18820/command
echo "py.exec_args import_fbx.py make_pak /Game/Import/ /tmp/output.pak" | http POST localhost:18820/command
echo "/tmp/output.pak,/Content/Import/02843684" | http POST localhost:18820/loadpak

ue4-orchestrator's People

Contributors

sabhiram avatar berendo avatar

Stargazers

Marc Hernandez avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.