Case Status
Log In



Home ยป Editing Basics»Working with Prefabs
Community Wiki

Working with Prefabs

With a normal script, the script is the same on the Prefab Parent and the Prefab Instance. You can override the parameters in an instance, but you cannot change the actual script.

You should follow the same rule with Playmaker by treating the FSM as the "script" and exposed variables as parameters.

In other words, you should avoid making changes to the FSM in Instances, only overriding exposed variables to tweak the behaviour of the instance.

Playmaker 1.8.6

The prefab workflow has been clarified in 1.8.6+ to reduce the chance of errors.

When you select a Prefab Instance FSM you will see this header:

Choose Edit Prefab to select the FSM on the Prefab Parent. You can edit the Prefab and changes propagate to the Instances.

If you choose Edit Instance certain edits will disconnect the instance from the Prefab Parent:

  • Adding or removing States, Actions, Events, or Variables
  • Editing transitions between states
  • Changing variable types
  • Re-ordering actions
  • Changing Templates

You will see a confirmation dialog when you make any of these edits.

If you confirm the edit, the Prefab Instance will be disconnected from the Prefab Parent:

  • Apply applies all changes you made to the instance to the Prefab Parent.
  • Revert discards all changes made to the instance and revert to the Prefab Parent.

This is useful if you drag a Prefab into a scene to edit it and then want to Apply the changes back to the Prefab. With Playmaker you can also use Edit Prefab to edit the FSM directly in the Prefab.

NOTE: You cannot use Undo/Redo with Apply and Revert!

Updating Scenes

Scenes saved with older versions of Playmaker may contain Prefab Instances that should be disconnected from their Prefab Parents.

When you load these scenes, Playmaker will automatically update prefab instances as needed. You can find a list of FSMs that were updated in the Unity Console.


This is the new recommended workflow, but if you need to, you can turn it off in Preferences > General : Prefabs.



See Also


Last modified on 12/27/2017 2:19 PM by User.

  • RSS Feed