Migrating from PlayMaker 1 to PlayMaker 2
Use this guide when rebuilding familiar PlayMaker 1 workflows in PlayMaker 2. The sections below show where to find the equivalent features.
Array variables → List variables
PlayMaker 2 calls array variables List variables. When you need a collection of values, create a List variable of the appropriate type, such as a Float List or GameObject List. Use List actions to add, remove, find, or sort items.
Finish FSM action → End State
PlayMaker 2 uses an End State instead of a Finish FSM action.
- Add or select the state where the FSM should finish.
- Mark it as an End State.
An End State has no outgoing transitions. If the FSM has parallel regions, it stops when every active region reaches an End State.
Input and Output groups
Configure the layout of exposed Inputs and Outputs on the root FSM Node:
- In the Variables Inspector, mark the variables you want to expose as Inputs or Outputs.
- Select the root FSM Node and find the Exposed Controls.
- Drag items to reorder them, or right-click to add groups and comments.
This layout controls how the exposed variables appear in other inspectors, including the FSM Component and actions that run FSM Templates.
Event data
PlayMaker 1 used actions to set and retrieve data associated with an event. In PlayMaker 2, define data on the event, set its value when sending the event, and retrieve it on the transition that handles it.
- In the Events Inspector, click Add Data and choose the data type for the event.
- Set the data in the action that sends the event.
- Select the receiving transition and retrieve the data in its Transition Inspector.
For example, a Take Damage event can carry the damage amount. The receiving transition retrieves that value for the FSM to use.
Component Actions
In PlayMaker 1, component actions took a GameObject and found the component they needed. In PlayMaker 2, these actions have a field for the component itself. You can assign a component variable directly or use a GameObject variable through the Variable Selector:
- Open the action's component field and choose a component variable if you already have one.
- To use a GameObject variable, open Convert in the Variable Selector and select that variable. PlayMaker finds the required component on the GameObject.
For example, the Rigidbody Set Speed action accepts a Rigidbody variable. To target a GameObject instead, select its variable from Convert in the Rigidbody field.
The GameObject must have the required component. If it does not, the conversion returns null. For actions targeting a component on the FSM's own GameObject, Owner can also find that component.