Method MaskField
MaskField(Rect, GUIContent, int, string[], Type)
Makes an Editor GUI control for mask properties.
Declaration
public static int MaskField(Rect position, GUIContent label, int mask, string[] displayedOptions, Type propertyType)
Parameters
Type | Name | Description |
---|---|---|
Rect | position | Rectangle on the screen to use for this control. |
GUIContent | label | Label for the field. |
int | mask | The current mask to display. |
string[] | displayedOptions | A string array containing the labels for each flag. |
Type | propertyType | The type of the property |
Returns
Type | Description |
---|---|
int | The value modified by the user. |
Remarks
This function is similar to EditorGUI.MaskField(Rect, string, int, string[]), but ensures that only the chosen bits are set. We need this version of the function to check explicitly whether only a single bit was set.