hara.runtime.unreal.impl

+init+

+protocol+

Unreal Python Remote Execution protocol constants.

discover-node

added in 4.1

(discover-node {:keys [multicast-group multicast-port bind-address discovery-timeout], :or {multicast-group (:multicast-group +protocol+), multicast-port (:multicast-port +protocol+), bind-address (:bind-address +protocol+), discovery-timeout 5000}})

Discovers a running Unreal Editor instance via UDP multicast ping/pong.

invoke-ptr-unreal

added in 4.1

(invoke-ptr-unreal rt ptr args)

Invokes a pointer in the Unreal runtime.

make-message

added in 4.1

(make-message type source & [dest data])

Builds a remote execution protocol message.

make-node-id

added in 4.1

(make-node-id)

Generates a new node id.

parse-message

added in 4.1

(parse-message s)

Parses a remote execution JSON message.

raw-eval-unreal

added in 4.1

(raw-eval-unreal rt code)

Sends Python code to Unreal and returns the command result.

recv-udp

added in 4.1

(recv-udp socket timeout-ms)

Receives a single UDP packet as a UTF-8 string, blocking up to timeout-ms.

send-udp

added in 4.1

(send-udp socket message host port)

Sends a JSON message over a UDP socket.

start-command-server

added in 4.1

(start-command-server {:keys [node-id source-id multicast-group multicast-port command-host command-port open-retries open-retry-delay], :or {open-retries 6, open-retry-delay 500}})

Starts a local TCP server and asks Unreal to connect to it.

start-unreal

added in 4.1

(start-unreal {:keys [id node-id multicast-group multicast-port bind-address discovery-timeout command-port], :as rt})

Starts an Unreal runtime by discovering a node and opening a command channel.

stop-unreal

added in 4.1

(stop-unreal {:keys [server socket node-id source-id multicast-group multicast-port], :as rt})

Closes the Unreal command channel.

unreal

added in 4.1

(unreal)(unreal m)

Creates and starts an Unreal runtime.

unreal-shared:create

added in 4.1

(unreal-shared:create m)

Creates a shared Unreal runtime client.

A flat :id is promoted to :rt/id so that (script :python {:runtime :unreal :id :shared}) shares the same Unreal connection across namespaces.

unreal:create

added in 4.1

(unreal:create {:keys [id], :as m})

Creates an Unreal runtime.