Skip to main content

Editor API

The Editor API allows you to enable or disable the Replay plugin programmatically.

For example, you may wish to integrate this API with CI, or control the usage of Luna Replay via a setting in your app.

Enable Capture Mode

Build.EnableCaptureMode();

Enable Replay Mode

Build.EnableReplayMode();

Get Current Capture Mode

Used to get the current state of Luna Replay. Possible states: Disabled, Capture and Replay.

Build.GetCurrentCaptureMode();

Is Replay Build

Used to detect whether a build was triggered via Luna's UI.

Build.IsReplayBuild;

Build for Linux

Build a Linux build for Luna Replay. This is the same as using the option in Tools > Luna Replay > Build for Creative Suite > Build Linux.

Build.Linux();

Disable Plugin

Build.DisablePlugin();

Command line example

xvfb-run --auto-servernum --server-args=-screen 0 640x480x24 “$UNITY_EXE_PATH” \
-batchmode -nographics -silent-crashes -logFile -projectPath “$PROJECT_PATH” \
-executeMethod Luna.Replay.Api.Build.EnableCaptureMode -quit