RemoteControlServer
Inherits: Object
HTTP remote control server for the Blazium editor and optional game runtime.
Description
Exposes a localhost JSON HTTP API on /v1/* using the HTTPServer singleton so blazium-cli remote (and other clients) can query status, list commands, execute registered commands, read paginated engine logs (GET /v1/logs), inspect debugger/Autowork state via /v1/exec, and optionally evaluate expressions. POST /v1/exec and POST /v1/eval are held and completed on the main thread so scene/editor work does not block the HTTP poll thread. Built-in editor play commands include play_main_scene, play_current_scene, play_custom_scene, pause_playing, resume_playing, stop_playing, and play_status. Snapshot commands snapshot_editor and snapshot_scene return PNG as png_base64 (optional args.path also writes a file); use blazium-cli remote snapshot editor|scene -o file.png to save locally.
Enable with ProjectSettings blazium/remote_control/server_enabled or command-line --enable-remote-control. Port and auth: --remote-control-port=<port> (default 6507, or blazium/remote_control/server_port) and --remote-control-token=<token> (or blazium/remote_control/token). Default bind is 127.0.0.1:6507.
POST /v1/eval accepts { "expression": "...", "language": "gdscript" | "luau" }. Luau requires the luau_module and is sandboxed. Prefer blazium-cli remote as the client surface.
Properties
|
||
|
||
|
Methods
eval_expression(expression: String, language: String = "gdscript") const |
|
get_port() const |
|
get_status() const |
|
is_started() const |
|
start() |
|
void |
stop() |
Property Descriptions
When true, POST /v1/eval is permitted.
String remote_instance_id = "" 🔗
Short id for this editor process, assigned after startup by blazium-cli (POST /v1/instance). Exposed on /v1/health and /v1/status as instance_id.
Optional bearer token. When set, clients must send Authorization: Bearer <token> or X-Remote-Control-Token.
Method Descriptions
Dictionary eval_expression(expression: String, language: String = "gdscript") const 🔗
Evaluates expression as GDScript (Expression) or Luau (language gdscript/gd or luau/lua) when allow_eval is enabled.
Active listening port.
Dictionary get_status() const 🔗
Status payload (project path, pid, mode, port, instance_id, luau_eval_available, etc.).
Returns whether remote control routes are active.
Starts listening (if needed) and registers /v1/* routes.
void stop() 🔗
Unregisters routes and stops the HTTP listener if this server started it.