Skip to content

Action Parameters

PlayMaker 2 uses new conventions for variable and event references.

Variables

Var

Variables use a Var postfix instead of an Fsm prefix.

Before:

FsmFloat myFloat;

Now:

FloatVar myFloat

Ref

Variable references use a Ref postfix instead of the [UseVariable] attribute.

Before:

[UseVariable] 
FsmFloat myFloat;

Now:

FloatRef myFloat;

WriteOnly

If a parameter is write only add a [WriteOnly] attribute:

[WriteOnly]
Vector3Ref myVector3;

This prevents the selection of constant values like Vector3.zero, Float.infinity, ...

Also see: Field Attributes.

Events

Event references use the Ref postfix:

Before:

FsmEvent myEvent;

Now:

EventRef myEvent;

Also see: Event Field Attributes.

Required Fields

Action fields are considered Required unless marked Optional.

This is a change from PM1 where fields where considered Optional unless marked as Required.

Before:

[RequiredField] 
FsmFloat requiredFloat;
FsmFloat optionalFloat;

Now:

FloatVar requiredFloat;
[OptionalField] 
FloatVar optionalFloat;

For a full list of attributes see: Field Attributes.