UI Metadata - anticto/Mutable-Documentation GitHub Wiki
Mutable also allows you to add metadata to its parameters and their values. With this metadata, you can easily create data-driven UIs. Some options you can specify are:
- Minimum & Maximum Values: If it is a float parameter, it defines its range.
- Editor Gameplay Tags: Editor Only option that allows you to add tags to parameters and parameter values. From the Preview Instance tab, you can filter those that contain the specified tags.
- Object Friendly & UI Section Names: User defined names.
- UI Order: Lower values will show first.
- UI Thumbnail: User defined Texture 2D.
- Editor UIThumbnail Object: Editor Only option used to set a thumbnail to a parameter value in the Instance Properties tab, only when the UI Thumbnails option is checked.
- Extra Information: User defined key value pairs.
- Extra Assets: User defined assets.
[!NOTE] Using "SliderImage" as an Extra Assets key on a float parameter will automatically use that image as the widget's background.
This Metadata is stored inside the Customizable Object and can be accessed using the following API:
- GetParameterUIMetadata: Returns the UI Metadata of the specified parameter.
- GetIntParameterOptionUIMetadata: Returns the UI Metadata of the specified parameter value.
- GetStateUIMetadata: Returns the UI Metadata of the specified state.
Table Nodes
Parameters generated through a Table Node can have metadata too. This can be done by adding a new variable to the Data Table Structure of type Mutable Param UI Metadata. Then, from the Table Node Properties tab, you can specify which column of the Data Table will be used as UI Metadata for each parameter value.