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:
- Read Base Action to understand the action structure.
- Use Variable Parameters and Event Parameters to expose inputs and outputs.
- Learn Update Mode to control when the action runs.
- Add a readable label with Action Summary.
- Use Attributes to improve how the action appears in the editor.
- 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.
-
Variable Parameters
Expose values as PlayMaker variables so users can work with constants or references.
-
Event Parameters
Let actions send PlayMaker events using
EventReffields. -
Update Mode
Control whether an action runs once, every frame, in fixed update, or in other update phases.
-
Action Summary
Show a clear natural-language summary when an action is collapsed in the editor.
-
Attributes
Use attributes to set categories, descriptions, layout behavior, and other editor metadata.
-
Error Checks
Validate required fields and improve the editing experience with helpful setup checks.
-
Custom Action Editors
Replace the default parameter UI with a custom editor built using UI Toolkit.
-
Scene GUI Drawer
Add scene tools and handles for actions that need in-scene editing support.
Typical Action Workflow
Most custom actions follow the same pattern:
- Create a class that inherits from
BaseAction. - Add fields for variables, events, and options.
- Use attributes to control how the action appears.
- Implement execution logic and choose the right update mode.
- Add a useful summary so the action is easy to scan in an FSM.
- 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.