Action Update
Instead of OnUpdate, OnFixedUpdate, etc. PlayMaker 2 actions have a single Execute method.
The Execute method is called based on the action's UpdateMode
Actions should also implement CanExecute to check if an action can execute. You can use the CheckParameters helper method to check that required fields are assigned.
Before:
Now:
public override bool CanExecute() => CheckParameters(Float, Add);
public override void Execute() => Float.Value += Add.Value;
Action Lifetime
These method names have changed:
| Before | Now | Description |
|---|---|---|
| OnEnter | OnStart | Called when the state is entered. |
| OnExit | OnStop | Called when the action finishes or the state is exited. |
| Awake | OnInitialized | Called when the action is first loaded, before OnStart. |
Every Frame
Many PlayMaker 1 actions had an Every Frame option. In PlayMaker 2 you no longer need to add this option as an action parameter, instead actions have an UpdateMode that includes this option.
See: Update Mode