Scripting / Interactables
ExecutionContextElement
Abstract base class for all world objects that participate in level execution. Extend this instead of MonoBehaviour when creating interactables. At execution start, the engine clones every root-level ExecutionContextElement in the scene, disables the originals, and runs gameplay on the clones — making execution fully reversible with Reset.
Protected Properties
| Property | Type | Description |
|---|---|---|
context | ExecutionContext | The execution context this element belongs to. Available after Initialize() is called. Use it to access context.inventory, context.player, and context.carryTarget. |
parent | ExecutionContextElement | The original scene element this clone was created from. null on the scene original itself. |
Public Properties
| Property | Type | Description |
|---|---|---|
IsRoot | bool | True if this element has no parent ExecutionContextElement in the hierarchy. Only root elements are cloned at execution start. |
Virtual Methods
| Method | Description |
|---|---|
Initialize( | Called when the execution clone is created. Sets context and parent. Override to add element-specific initialization — always call base.Initialize() first. |
Protected Methods
| Method | Returns | Description |
|---|---|---|
ExecutionReference<T>() | T | Returns the execution-context clone of this element cast to T. Use this inside methods called from scene originals when you need to operate on the runtime clone instead. |