You can add Attributes to actions to customize their appearance in the Playmaker editor.
Attribute | Description | |||||
---|---|---|---|---|---|---|
ActionTarget |
Defines an Object type that the Action works with. Used by Playmaker to make relevant context menus, e.g., for drag and drop.
Parameters:
ObjectType: Defines the Object type that the Action works with. FieldName: Defines the name of a field to set to the value of the target Object.
NOTES:
C# Example:
|
|||||
ActionCategory |
Defines the action's category in the Action Browser.
Use either the built-in ActionCategory enum or a string value to define a custom category.
C# Example:
|
|||||
Tooltip |
Defines rollover hints. Use on a class or any public field.
C# Example:
|
|||||
HelpUrl |
Defines a url to use for the help button next to the action title.
C# Example:
|
|||||
Note |
Display a Note for extra information about the action.
C# Example:
|
|||||
RequiredField |
Use on any public field that the user must define. If the parameter is left undefined the editor will show an error.
C# Example:
|
|||||
Title |
Defines a new display name for an action field in the editor.
C# Example:
|
|||||
CheckForComponent |
Use on a public GameObject, FsmGameObject or FsmOwnerDefault field to check that the specified game object has the required components. Otherwise an error will show under the field.
NOTE, you can specify up to 3 component types to check for.
C# Example:
|
|||||
HasFloatSlider |
Use on a public float field to show a slider.
NOTE, You specify min/max values for the slider, but you can still enter values outside that range in the edit field. This is by design...
C# Example:
|
|||||
ArrayEditor |
Use this attribute to show an appropriate editor for an FsmArray variable.
C# Example:
Optional parameters let you customize the editor further:
|
|||||
ActionSection |
Use on a public field to create a bold section label above that field.
Use this to organize the UI.
|
|||||
UIHint |
Use on a public field to help Playmaker show the most appropriate editor for the type of data.
See the table below for details.
|
|||||
ObjectType |
Use on a public field to define FsmEnum and FsmObject types.
C# Example:
C# Example:
|
|||||
HideInInspector NEW: 1.9.0 |
Use on a public field that you want to hide in the action editor. | |||||
HideIf NEW: 1.9.0 |
Use on a public field, specifying a method name.
The method will be called by the editor to determine if the field should be shown or not. Return true to hide the field or false to show it.
|
|||||
SettingsMenuItem NEW: 1.9.0 |
Use on a public static method to add a menu item to the action's Setttings Menu.
C# Example:
|
|||||
SettingsMenuItemState NEW: 1.9.0 |
Use on a public static method to return the checked state of a Settings Menu Item defined by SettingsMenuItem (above).
C# Example:
|
|||||
PreviewField NEW: 1.9.0 |
Use on a public field to specify a method to draw a preview under the field in the editor.
C# Example:
|
|||||
DisplayOrder NEW: 1.9.0 |
Use on a public field to change the display order of the parameter in the editor. 0 = first, 1 = second etc.
Useful when using inheritance in custom action editors. E.g., you specify some common parameters in a base editor class that you want to display at the top of the editor.
C# Example:
|
|||||
NoErrorCheck NEW: 1.9.5 |
Use on a public field to turn off error checking for that field.
For example, if an action defines events that aren't used in a transition you would normally get an "event not used" error. If you know that they are in fact used in some other way you can add this attribute to remove the error. |
UIHint
Use a UIHint attribute on a public field to help Playmaker show the most appropriate editor for the type of data.
Hint | Description |
---|---|
Animation | Use on a string field to add an animation browser button. The browser will try to find animations on the targeted game object. |
Behaviour | Use on a string field to add a Behavior popup button. The popup will attempt to find behaviors on the targeted game object. |
Coroutine | Use on a string field to add a Coroutine popup button. The popup will attempt to find Coroutine methods on the targeted game object. |
Description | Use on a string field to display the text in a large readonly info box. |
Layer | Use on an integer field to show a Layer popup button. |
Script | Use on a string field to add a script popup button. The popup will attempt to find scripts on the previously specified game object. |
Tag | Use on a string field to show a Tag popup button. |
TextArea | Use on a string field to use a larger text edit field. |
Variable | Use on an Fsm Variable field (FsmFloat, FsmInt, FsmBool...) to show a variable popup button used to select a variable of that type. |