Allows for simple hiding of properties in the UnityEditor depending on certain conditions. For instance, in the following example the "type" field will only be displayed in the inspector if the "tracking" field is set to true: More...
Public Types | |
enum | compareType { compareType.EQUAL, compareType.BIGGER, compareType.SMALLER, compareType.BIGGEREQUAL, compareType.SMALLEREQUAL, compareType.UNEQUAL } |
Public Member Functions | |||||||||
ConditionalHideInInspector (string hideConditionPropertyName, bool invertCondition=false) | |||||||||
Hides a field in the Inspector if a given condition is true.
| |||||||||
ConditionalHideInInspector (string hideConditionPropertyName, float compareValue, compareType ctype=compareType.EQUAL, bool invertCondition=false) | |||||||||
Hides a field in the Inspector if a given condition is true.
| |||||||||
ConditionalHideInInspector (string hideConditionPropertyName, int compareValue, compareType ctype=compareType.EQUAL, bool invertCondition=false) | |||||||||
Hides a field in the Inspector if a given condition is true.
| |||||||||
Properties | |
compareType | ctype [get, set] |
string | hideConditionPropertyName [get, set] |
bool | invertCondition [get, set] |
float | compareValue [get, set] |
Allows for simple hiding of properties in the UnityEditor depending on certain conditions. For instance, in the following example the "type" field will only be displayed in the inspector if the "tracking" field is set to true:
hideConditionPropertyName | The first parameter is always the name of the field that represents the condition. The name is case-sensitive. |
invertCondition | Will invert the given condition. Hence why in the example above, tracking = false hides the type field. |
compareValue | Optionally, one can compare the given field with some given value. The type of comparison is determined by: |
ctype | Type of comparison performed if a compareValue is provided. Examples: |
Definition at line 128 of file AVR_Attributes.cs.