Skip to content

Custom Actions

Warning

If you edit official PlayMaker actions your changes will be lost the next time you update PlayMaker.
Instead copy the action, rename it and change the namespace to make your own action.

Custom actions let you extend PlayMaker with your own reusable building blocks.

This section covers the core APIs and patterns used to create actions that feel at home in the PlayMaker editor.

PlayMaker ships with the source code for most built-in actions, which makes them a great reference when you're building something similar yourself.

Hint

Select Edit Script... in the Action Editor or Action Browser context menus to view the action's script.


Where To Start

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

  1. Read Base Action to understand the action structure.
  2. Use Variable Parameters and Event Parameters to expose inputs and outputs.
  3. Learn Update Mode to control when the action runs.
  4. Add a readable label with Action Summary.
  5. Use Attributes to improve how the action appears in the editor.
  6. Add Error Checks to help users catch setup mistakes early.

Common Tasks

  • Base Action

    Start with the core action class, execution flow, and a minimal custom action example.

    Open Base Action

  • Variable Parameters

    Expose values as PlayMaker variables so users can work with constants or references.

    Open Variable Parameters

  • Event Parameters

    Let actions send PlayMaker events using EventRef fields.

    Open Event Parameters

  • Update Mode

    Control whether an action runs once, every frame, in fixed update, or in other update phases.

    Open Update Mode

  • Action Summary

    Show a clear natural-language summary when an action is collapsed in the editor.

    Open Action Summary

  • Attributes

    Use attributes to set categories, descriptions, layout behavior, and other editor metadata.

    Open Attributes

  • Error Checks

    Validate required fields and improve the editing experience with helpful setup checks.

    Open Error Checks

  • Custom Action Editors

    Replace the default parameter UI with a custom editor built using UI Toolkit.

    Open Custom Action Editors

  • Scene GUI Drawer

    Add scene tools and handles for actions that need in-scene editing support.

    Open Scene GUI Drawer


Typical Action Workflow

Most custom actions follow the same pattern:

  1. Create a class that inherits from BaseAction.
  2. Add fields for variables, events, and options.
  3. Use attributes to control how the action appears.
  4. Implement execution logic and choose the right update mode.
  5. Add a useful summary so the action is easy to scan in an FSM.
  6. Add error checks if the action needs required references.

Once that is working, you can go further with custom editors or scene GUI tools when the default inspector is not enough.