Photon Fusion 1.1.12

Public Member Functions | Public Attributes | List of all members
DrawIfAttribute Class Reference

Fusion editor attribute for selectively drawing/hiding fields. Condition member can be a property, field or method (with a return value). More...

Inherits DoIfAttribute.

Public Member Functions

 DrawIfAttribute (string conditionMemberName)
 Constructor. More...
 
 DrawIfAttribute (string conditionMemberName, bool compareToValue)
 Constructor. More...
 
 DrawIfAttribute (string conditionMemberName, double compareToValue)
 Constructor. More...
 
- Public Member Functions inherited from DoIfAttribute
 DoIfAttribute (string conditionMemberName)
 Base Constructor. More...
 
 DoIfAttribute (string conditionMemberName, bool compareToValue)
 Base Constructor. More...
 
 DoIfAttribute (string conditionMemberName, double compareToValue)
 Base Constructor. More...
 

Public Attributes

bool Hide
 Instructs the attribute completely hide the field if not draw, rather than the default of just disabling it. More...
 
- Public Attributes inherited from DoIfAttribute
DoIfCompareOperator Compare
 
double CompareToValue
 
string ConditionMember
 

Detailed Description

Fusion 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

Constructor & Destructor Documentation

◆ DrawIfAttribute() [1/3]

DrawIfAttribute ( string  conditionMemberName,
double  compareToValue 
)

Constructor.

Parameters
conditionMemberNameCondition 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

Parameters
compareToValueThe value to compare the member value against.
hideHow the field should be hidden (disabled or removed)
compareHow the condition member value and compareToValye will be evaluated.

◆ DrawIfAttribute() [2/3]

DrawIfAttribute ( string  conditionMemberName,
bool  compareToValue 
)

Constructor.

Parameters
conditionMemberNameCondition 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

Parameters
compareToValueThe value to compare the member value against.
compareHow the condition member value and compareToValye will be evaluated.

◆ DrawIfAttribute() [3/3]

DrawIfAttribute ( string  conditionMemberName)

Constructor.

Parameters
conditionMemberNameCondition 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

Parameters
hideHow the field should be hidden (disabled or removed)
compareHow the condition member value and compareToValye will be evaluated.

Member Data Documentation

◆ Hide

bool Hide

Instructs the attribute completely hide the field if not draw, rather than the default of just disabling it.