Skip to content
Project referenceDevelopmentEngine ccf7d03f
Authored
  • Atomic Edit/Play transitions with fresh script tickets, isolated scene/history/audio and verified retirement.

Atomic Edit/Play transitions with fresh script tickets, isolated scene/history/audio and verified retirement.

Play Mode describes its six states, fresh-ticket admission, isolated runtime world and presentation switch. The controller coordinates existing scene/script/audio/history owners rather than owning their formats or implementations. It never simulates by mutating the Edit world and later restoring bytes.

IEditorPlayMode and EditorPlayModeState are selected script contracts. EditorPlayModeController and EditorPlayModeLoop are host infrastructure: frame-safe transition advancement, one tick per frame, coordinated shutdown and reload participation remain host-owned. Only the public interface/enum enter the projected script facade.

Manual Reload is admitted only while Editing. Automatic changes wait for completed Play retirement and do not stop the game. Required entry compilation can activate before Play resources exist; this is not permission for arbitrary manual Reload during Compiling. Pending disposal preserves owners/Stopping, and a faulted gate requires restart. State observation returns a disposable subscription and aggregates observer errors after notifying all listeners.

These use the actual host contracts and borrowed live dependencies. They do not initialize a product or establish lifecycle/device acceptance.

using Inno.Editor.PlayMode;
public static class Example0
{
static bool Toggle(IEditorPlayMode playMode)
{
return playMode.state is EditorPlayModeState.Editing or EditorPlayModeState.Failed
? playMode.EnterPlayMode()
: playMode.ExitPlayMode();
}
}

Source project. Declarations, script selection and runtime behavior require separate matching evidence.

Types and exact member contracts preserve captured declarations and source XML.

The compiler-selected script declarations are separate from this project’s host CLR surface. Read the script calling guide and the associated module contracts before using a projected member.

Project: Inno.Editor.PlayMode
Source: src/composition/editor/features/Inno.Editor.PlayMode/Inno.Editor.PlayMode.csproj

Type API Description
EditorPlayModeController engine Implements the deterministic state machine for one editor Play Mode workflow.
EditorPlayModeLoop engine Bridges the editor host frame clock to the active Play Mode session.
EditorPlayModeState engine Identifies the current relationship between editor documents and game simulation.
IEditorPlayMode engine Controls the editor’s isolated game-simulation session.
EditorPlayModeState Editor Identifies the current relationship between editor documents and game simulation.
IEditorPlayMode Editor Controls the editor’s isolated game-simulation session.