Class UnitSandboxPlay

Namespace
TDMaker.Editor
Assembly
TDMaker.Editor.dll

Play-mode sandbox of the Unit Workshop: opens a new unsaved scene (camera, runner, views, debug HUD), enters Play mode, then rebuilds the sandbox level in play mode (so nothing depends on objects surviving the domain reload), builds every tower and calls the wave. Nothing is written to disk. When Play mode stops, the scenes that were open before (saved scenes only) are opened again.

[InitializeOnLoad]
public static class UnitSandboxPlay
Inheritance
UnitSandboxPlay
Inherited Members

Fields

RootName

Name of the sandbox root object in the temporary scene.

public const string RootName = "TD Maker Sandbox"

Field Value

string

Methods

CaptureScenes()

The open saved scenes (paths, loaded state and the active one) as JSON, for RestoreScenes(string).

public static string CaptureScenes()

Returns

string

RestoreScenes(string)

Opens the scenes recorded by CaptureScenes() again (replacing the open ones). Returns false when nothing could be restored (no saved scene was open, or the files are gone); the current scenes then stay.

public static bool RestoreScenes(string json)

Parameters

json string

Returns

bool

Start(Setup, ArtSet)

Opens the temporary scene and enters Play mode with setup.

public static void Start(UnitSandbox.Setup setup, ArtSet art)

Parameters

setup UnitSandbox.Setup
art ArtSet