Variables
Actions can use variables instead of constant values.
PlayMaker defines variable types for the equivalent data type.
Example
Let's use float as an example:
Float
This creates a normal float field.
FloatVar
This creates a float variable field that can use a constant float value or reference a float variable.
FloatRef
This creates a dropdown to select a float variable.
This is often combined with a WriteOnlyAttribute for action outputs:
Value Property
Actions can access Var and Ref values using the Value property:
Enum Variables
Enum variables need a BaseTypeAttribute to define the exact type of enum to use:
The action should cast the enum value to the required type:
Attributes
Action parameters can be customized using attributes.
These are some of the more common attributes:
Tooltip Attribute
The Tooltip to use in tooltips:
DefaultValue Attribute
The DefaultValue for the parameter used when creating and resetting the action.
OwnerDefaultValue Attribute
OwnerDefaultValue marks a parameter as defaulting to Owner.
Note: There is also a rule that the first parameter is automatically considered OwnerDefault if it is a Component. Use NotOwnerDefaultValue to override this rule.
MatchType Attribute
MatchType indicates that a parameter should match the type of another parameter: