|
Public Member Functions | |
| void | Attribute (string defvalue="", string uiwidget="auto", string desc="", string params="", ParamEnumArray enums=NULL, string category="", int precision=3, TypeName enumType=void, bool prefabbed=false) |
Public Attributes | |
| string | m_DefValue |
| string | m_UiWidget |
| use values from UIWidgets. | |
| string | m_Params |
| Parameters that specify how the chosen UI widget (defined in m_UiWidget attribute) behaves together with the attribute that can be of several data types. | |
| string | m_Desc |
| string | m_Category |
| int | m_Precision |
| bool | m_Prefabbed |
| ref ParamEnumArray | m_Enums |
| Only integers and floats are currently supported. | |
| TypeName | m_EnumType |
| void Attribute.Attribute | ( | string | defvalue = "", |
| string | uiwidget = "auto", | ||
| string | desc = "", | ||
| string | params = "", | ||
| ParamEnumArray | enums = NULL, | ||
| string | category = "", | ||
| int | precision = 3, | ||
| TypeName | enumType = void, | ||
| bool | prefabbed = false ) |
| string Attribute.m_Category |
| string Attribute.m_DefValue |
| string Attribute.m_Desc |
| ref ParamEnumArray Attribute.m_Enums |
| TypeName Attribute.m_EnumType |
| string Attribute.m_Params |
Parameters that specify how the chosen UI widget (defined in m_UiWidget attribute) behaves together with the attribute that can be of several data types.
The parameters must be separated by spaces and you can only use those that are compatible with the widget and attribute data type. These parameters bellow are for specific data types. They work with most of widgets although some combinations don't make sense. Beside them you can use also other parameters described within widget types in UIWidgets.
For numbers (integers, scalars):
"minValue maxValue stepValue" - These three parameters are identified only by their position from left to right. It means that:
This simple rule with fixed order/position describes when they must be defined and when they don't. For example if you want to define maxValue then you must define also minValue parameter due to it's correct position.
The stepValue is deprecated and it's also not functional at the moment but it becomes mandatory when you have more than these three parameters!
Examples:
For vectors:
coordsVar=coordsVariableName - Specifies which another vector attribute holds coordinates that are good for a gizmo in scene when editing the attribute value itself. It makes sense together with purpose=angles
Examples:
For resource names:
For arrays (of all types):
| int Attribute.m_Precision |
| bool Attribute.m_Prefabbed |
| string Attribute.m_UiWidget |
use values from UIWidgets.
Each widget type contains a description of possible parameters which you can put into the m_Params variable bellow