Skip to content

Variable Selector

The popup lets you quickly select a variable:

Variable Selector

Start typing to quickly find a variable.

The variables list shows variables in this order:

  • Used Variables: Variables already used by the FSM.
  • Convert: Variables that can be converted.
  • Properties: Compatible properties on any variable.
  • Global Variables: All global variables in the project.
  • System: Constant or pre-defined values.

You can also make new variables:

Converting Variables

Convert lets you select variables that can be converted and assigned to the target field.

For example, you can convert a float variable to a string:

Variable Convert

See Conversion Rules.

Accessing Variable Properties

Properties lets you select common variable properties.

For example, if you have a GameObject variable you can select GameObject.position:

Variable Properties

System Variables

System lets you select constants and other pre-defined values.

For example, you can select Vector3.left, Vector3.right, etc.

System Variables

Add New Variable

Select New Variable to make a new variable and assign it to the field:

New Variable

Tip

The Name field is prefilled with the any search text you typed.

So you can type the new variable name and hit enter to edit it.
Hit enter again to create the new variable.

Conversion Rules

PlayMaker convert types, using these rules:

Target Type From Type Conversion Method Notes
Transform GameObject GameObject.transform
GameObject Transform Transform.gameObject
Component GameObject GameObject.GetComponent() Can be null if the GameObject does not have that component.
GameObject Component Component.gameObject Can be null if the Component is null.
Component Component Component.gameObject.GetComponent() Can be null if the GameObject does not have that component.
String Any Uses ToString()

Performance Tip

If a Property exists it's generally more performant than using conversion. For example, Collision variables have a RigidBody property that doesn't need to call GetComponent.