Skip to main content
Version: v4 (current)

Unity Editor Hot Runner Worker Preview

The GameCI Editor Tools package includes an experimental Unity Editor worker that can keep an editor process warm between local build jobs. This page covers the package's current preview and first-use workflow.

Preview status: This worker is for local evaluation and custom integrations. It is not an Orchestrator provider and does not implement the Streaming Runner protocol described in Streaming Runner. Runner registration, workspace synchronization, artifact transfer, and CLI/Orchestrator dispatch are not included.

Install and start​

The package supports Unity 2021.3 and newer. In Unity Package Manager, select Add package from Git URL and enter:

https://github.com/game-ci/game-ci-editor-tools.git

Open Window > Game CI > Hot Runner Settings. File-Based is the default transport and the recommended way to start. Choose a transport and select Start Server. The settings window shows the file watch directory or HTTP endpoint while the worker is running.

The source is released under the MIT License.

Submit a build over HTTP​

HTTP is unauthenticated and binds to 127.0.0.1 by default. Keep it on loopback. A job can invoke project build code, so do not expose this endpoint to an untrusted network.

Select HTTP, keep Host set to 127.0.0.1, and start the server. Then submit a build:

curl http://127.0.0.1:9090/health

curl -X POST http://127.0.0.1:9090/job \
-H "Content-Type: application/json" \
-d '{"jobId":"local-001","buildTarget":"StandaloneLinux64","buildPath":"Builds/StandaloneLinux64"}'

curl http://127.0.0.1:9090/result/local-001

The job endpoint returns 202 when it accepts a job. Poll /result/<jobId> until it returns 200; 404 means the result is not ready yet. A repeated job ID returns 409. A malformed job returns 400, and a request body larger than 1 MiB returns 413.

Job IDs may contain letters, numbers, hyphens, underscores, and periods, up to 128 characters. A build request may specify:

  • buildTarget: a Unity BuildTarget available in the open editor installation.
  • buildPath: output path relative to the Unity project, or an absolute path.
  • buildMethod: a public, parameterless static void method, named as Namespace.ClassName.MethodName.

Build jobs use the scenes enabled in File > Build Settings. Treat buildMethod requests as executable project code.

Submit a build with the file transport​

File-Based watches the configured directory directly. If no custom directory is set, the path is the system temporary directory followed by gameci-hotrunner/<port>; for example, %TEMP%\gameci-hotrunner\9090 on Windows. The settings window shows the actual path.

Write the complete job to a temporary file in the watch directory, then rename it to job-<jobId>.json. For example, in PowerShell:

$watch = "$env:TEMP\gameci-hotrunner\9090"
$job = @{ jobId = "local-001"; buildTarget = "StandaloneWindows64"; buildPath = "Builds/StandaloneWindows64" } | ConvertTo-Json
$temporary = Join-Path $watch "job-local-001.json.tmp"
$jobPath = Join-Path $watch "job-local-001.json"
[System.IO.File]::WriteAllText($temporary, $job)
[System.IO.File]::Move($temporary, $jobPath)

The worker consumes job-<jobId>.json, publishes result-<jobId>.json, and writes periodic status to status/status.json. Results and status are published atomically. A custom directory is used as-is; it does not receive an automatic port subdirectory.

To request shutdown, create shutdown.signal in the watch directory. The worker removes the signal after reading it.

With HTTP, send POST /shutdown to request a graceful stop:

curl -X POST http://127.0.0.1:9090/shutdown

Current limitations​

  • The worker runs one build at a time. A concurrent job receives a failed result explaining that the runner is busy.
  • Test jobs return an unsupported result. Test Framework execution and asynchronous result collection are not implemented.
  • timeoutSeconds and customParametersJson are reserved request fields and currently have no effect.
  • Build outputs are reported as paths. The worker does not upload or transfer artifacts.
  • The worker does not synchronize source or project workspaces between jobs.
  • The HTTP service has no authentication or TLS. Its safe default is loopback-only.
  • The worker's transport and data contract differ from the CLI Hot Runner service. The preview endpoints cannot currently be configured as an Orchestrator runner.

For the intended future protocol and streaming workspace model, see Streaming Runner. Use the GameCI CLI documentation for supported Orchestrator builds.