Skip to content

Custom Variables

Custom variables let PlayMaker work with types that are not built in to the standard variable list.

They wrap your type in PlayMaker variable classes so the editor can serialize it, show it in the Variables UI, and use it in actions without boxing costs.

Note

Unity needs concrete implementations of generic types for serialization.

Where To Start

If you're making your first custom variable, this is a good path:

  1. Start with Minimal Example to create the core wrapper types.
  2. Add List Variables if your type also needs list support.
  3. Add FSM Overrides and Outputs if your type needs template inputs or outputs.

Pages

  • Minimal Example

    Define the basic wrapper types, learn when to use each one, and expose them in custom actions.

    Open Minimal Example

  • List Variables

    Add ListVariable, ListVariableRef, and ListVariableVar wrappers for collections of your custom type.

    Open List Variables

  • FSM Overrides and Outputs

    Expose custom values as FSM template inputs with VariableOverride and outputs with VariableOutput.

    Open FSM Overrides and Outputs