Editor attribute for selectively drawing/hiding fields. Condition member can be a property, field or method (with a return value). More...
Inherits DoIfAttributeBase.
Public Member Functions | |
DrawIfAttribute (string propertyPath) | |
DrawIfAttribute (string propertyPath, bool compareToValue, CompareOperator compare=CompareOperator.Equal, DrawIfMode mode=DrawIfMode.ReadOnly) | |
Constructor. | |
DrawIfAttribute (string propertyPath, double compareToValue, CompareOperator compare=CompareOperator.Equal, DrawIfMode mode=DrawIfMode.ReadOnly) | |
Constructor. | |
DrawIfAttribute (string propertyPath, long compareToValue, CompareOperator compare=CompareOperator.Equal, DrawIfMode mode=DrawIfMode.ReadOnly) | |
Public Attributes | |
DrawIfMode | Mode |
Instructs the attribute completely hide the field if not draw, rather than the default of just disabling it. | |
Public Attributes inherited from DoIfAttributeBase | |
double | _doubleValue |
bool | _isDouble |
long | _longValue |
CompareOperator | Compare |
string | ConditionMember |
bool | ErrorOnConditionMemberNotFound = true |
Properties | |
bool | Hide [get, set] |
Additional Inherited Members | |
Protected Member Functions inherited from DoIfAttributeBase | |
DoIfAttributeBase (string propertyPath, double compareToValue, CompareOperator compare) | |
DoIfAttributeBase (string propertyPath, long compareToValue, CompareOperator compare) | |
Editor attribute for selectively drawing/hiding fields. Condition member can be a property, field or method (with a return value).
Value of condition method is converted to a long. Null = 0, False = 0, True = 1, Unity Object = InstanceId
DrawIfAttribute | ( | string | propertyPath, |
double | compareToValue, | ||
CompareOperator | compare = CompareOperator::Equal , |
||
DrawIfMode | mode = DrawIfMode::ReadOnly |
||
) |
Constructor.
propertyPath | Condition member can be a property, field or method (with a return value). |
Value of condition method is converted to a long. Null = 0, False = 0, True = 1, Unity Object = InstanceId
compareToValue | The value to compare the member value against. |
mode | How the field should be hidden (disabled or removed) |
compare | How the condition member value and compareToValye will be evaluated. |
DrawIfAttribute | ( | string | propertyPath, |
bool | compareToValue, | ||
CompareOperator | compare = CompareOperator::Equal , |
||
DrawIfMode | mode = DrawIfMode::ReadOnly |
||
) |
Constructor.
propertyPath | Condition member can be a property, field or method (with a return value). |
Value of condition method is converted to a long. Null = 0, False = 0, True = 1, Unity Object = InstanceId
compareToValue | The value to compare the member value against. |
compare | How the condition member value and compareToValye will be evaluated. |
mode | How the field should be hidden (disabled or removed) |