Inspector Fields

FieldTypeDescription
instructionTypeSerializedType<PlayerInstruction>The concrete PlayerInstruction subclass this action creates. Set this to your custom class in the Inspector dropdown.
layoutInstructionLayoutThe InstructionLayout prefab that provides the visual widget for this instruction on the sheet. Use the matching layout type for the instruction kind: plain InstructionLayout for standard instructions, InstructionModifierLayout for modifiers, and so on.

Methods

MethodDescription
CreateInstruction()Instantiates a new PlayerInstruction of the type set in instructionType using Activator.CreateInstance. Returns the new instance.
CreateLayout(
  PlayerInstruction instruction,
  Transform container)
Instantiates the layout prefab under container and binds it to instruction. Returns the new InstructionLayout.
CreateLayout(
  PlayerInstruction instruction,
  Transform container,
  int index)
Same as above but inserts the layout at the specified sibling index instead of appending.
Load(
  PlayerInstruction instruction,
  Transform container)
Restores a layout from a saved instruction — calls layout.Load() instead of CreateInstance() to rebuild the widget without triggering add-sounds or undo snapshots.

Setting up an Action in the Palette

  1. In the scene's palette GameObject (a child of the instruction panel), duplicate an existing Action GameObject or create a new one.
  2. On the Action component set instructionType to your custom PlayerInstruction subclass.
  3. Set layout to the InstructionLayout prefab that matches your instruction type.
  4. The DragAndDrop component on the same GameObject handles the drag interaction automatically — no additional wiring is needed.

See Create an Instruction for the full end-to-end workflow including the C# class and prefab setup.