Scripting / Instructions
Sequence Layout Interfaces
UI-side counterpart to InstructionSequence. These interfaces define how instruction sequence widgets are rendered and managed on the player's instruction sheet.
IInstructionSequenceLayout
UI widget that renders a nested instruction list in the player's editor panel. Keeps the visual widget tree in sync with the underlying InstructionSequence model.
Properties
| Member | Type | Description |
|---|---|---|
gameObject | GameObject | Root GameObject of this sequence layout widget. |
Childrens | IReadOnlyList<INestedInstructionLayout> | All child instruction widgets currently in the sequence. |
Count | int | Number of child widgets. |
lastSibling | INestedInstructionLayout | The last child widget, or null if the sequence is empty. |
Methods
| Method | Description |
|---|---|
AddInstruction(Action action) | Creates and appends a new instruction widget from an action callback. |
AddInstruction(PlayerInstruction instruction, Action action) | Appends a widget for an already-created instruction. |
Insert(int index, Action action) | Inserts a new instruction widget at the given index. |
RemoveInstruction(INestedInstructionLayout instruction) | Removes a child widget and its associated instruction. |
GetChild(int index) | Returns the child widget at the given index. |
INestedInstructionLayout
Represents a single instruction card nested inside an IInstructionSequenceLayout. Bridges the visual widget and the underlying PlayerInstruction it displays.
Properties
| Member | Type | Description |
|---|---|---|
gameObject | GameObject | Root GameObject of this instruction widget. |
instruction | PlayerInstruction | The instruction this widget represents. |
container | IInstructionSequenceLayout | The parent sequence layout that owns this widget. |
Methods
| Method | Description |
|---|---|
ResetLayout() | Resyncs the visual state to match the current instruction data. |
See also: InstructionSequence