You can add Attributes to actions to customize their appearance in the Playmaker editor.
Attribute | Description | |
---|---|---|
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:
[ActionCategory(ActionCategory.Animation)] public class MyAnimationAction : FsmStateAction [ActionCategory("Custom")] public class MyCustomAction : FsmStateAction |
|
Tooltip |
Defines rollover hints. Use on a class or any public field.
C# Example:
[Tooltip("This is the best action ever!")] public class MyCustomAction : FsmStateAction |
|
HelpUrl |
Defines a url to use for the help button next to the action title.
C# Example:
[HelpUrl("http://hutonggames.com/playmakerforum/index.php?topic=1711.0")] public class ConvertSecondsToString : FsmStateAction ... |
|
Note |
Display a Note for extra information about the action.
C# Example:
|
|
RequiredField |
Use on any public field that the user must define. If left undefined the editor will show an error.
C# Example:
[RequiredField] public FsmBool importantOption; |
|
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:
[CheckForComponent(typeof(Animation))] public FsmGameObject gameObjectToAnimate; |
|
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:
[HasFloatSlider(0, 100)] public FsmFloat health; |
|
ActionSection | Use on a public field to create a label to organize the UI better. | |
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. |
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 for an animation browser button. |
Behaviour | Use on a string field for a Behavior popup button. The popup will attempt to find behaviors on the previously specified game object. |
Coroutine | Use on a string field for a Coroutine popup button. The popup will attempt to find Coroutine methods on the previously specified game object. |
Description | Use on a string field to format the text in a large readonly info box. |
Layer | Use on an integer field for a Layer popup button. |
Script | Use on a string field for a script popup button. The popup will attempt to find scripts on the previously specified game object. |
Tag | Use on a string field for a Tag popup button. |
TextArea | Use on a string field for 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. |