Photon Fusion 1.1.9

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

Fusion editor attribute for adding notices to fields if the condition member evaluates as true. Condition member can be a property, field or method (with a return value). More...

Inherits DoIfAttribute.

Public Member Functions

 WarnIfAttribute ()
 Constructor.
 
 WarnIfAttribute (string conditionMember, bool compareToValue, string message)
 Constructor.
 
 WarnIfAttribute (string conditionMember, double compareToValue, string message)
 Constructor.
 
 WarnIfAttribute (string conditionMember, string message)
 Constructor.
 
 WarnIfAttribute (string message)
 Constructor.
 
- Public Member Functions inherited from DoIfAttribute
 DoIfAttribute (string conditionMemberName)
 Base Constructor.
 
 DoIfAttribute (string conditionMemberName, bool compareToValue)
 Base Constructor.
 
 DoIfAttribute (string conditionMemberName, double compareToValue)
 Base Constructor.
 

Public Attributes

string ActionMethod
 The name of a method with no arguments and returns void, which will execute when the warning icon is clicked.
 
string Message
 The default warning text, when a warning is shown.
 
string MsgProvider
 The name of any member which can be evaluated to a string value, which will be used as the source for the warning message text. If null (default), then WarnIfAttribute.Message will be used instead.
 
int MsgType
 The default message type for this warning. 0 = None, 1 = Info, 2 = Warning, 3 = Error.
 
string MsgTypeProvider
 The name of any member which can be evaluated to an int value, which will be used as the source for the MsgType value. If null (default), then WarnIfAttribute.MsgType will be used instead. 0 = None, 1 = Info, 2 = Warning, 3 = Error.
 
bool UseMsgIconOnly
 Limits the warning box to only the icon next to the value field, rather than using the inline message box which is added below the field.
 
- Public Attributes inherited from DoIfAttribute
DoIfCompareOperator Compare
 
double CompareToValue
 
string ConditionMember
 

Detailed Description

Fusion editor attribute for adding notices to fields if the condition member evaluates as true. 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

◆ WarnIfAttribute() [1/4]

WarnIfAttribute ( string  message)

Constructor.

Parameters
messageThe text of the info box.

◆ WarnIfAttribute() [2/4]

WarnIfAttribute ( string  conditionMember,
string  message 
)

Constructor.

Parameters
conditionMemberName of a property, field or method (with a return value) member.

Value of condition method is converted to a double. Null = 0, False = 0, True = 1, Unity Object = InstanceId

Parameters
messageThe text of the info/warn/error box.

◆ WarnIfAttribute() [3/4]

WarnIfAttribute ( string  conditionMember,
double  compareToValue,
string  message 
)

Constructor.

Parameters
conditionMemberName of a property, field or method (with a return value) member.

Value of condition method is converted to a double. Null = 0, False = 0, True = 1, Unity Object = InstanceId

Parameters
compareToValueThe value the conditionMember value is compred to.
messageThe text of the info/warn/error box.

◆ WarnIfAttribute() [4/4]

WarnIfAttribute ( string  conditionMember,
bool  compareToValue,
string  message 
)

Constructor.

Parameters
conditionMemberName of a property, field or method (with a return value) member.

Value of condition method is converted to a double. Null = 0, False = 0, True = 1, Unity Object = InstanceId

Parameters
compareToValueThe value the conditionMember value is compred to.
messageThe text of the info/warn/error box.