Photon Fusion 1.1.2

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. More...
 
 WarnIfAttribute (string message)
 Constructor. More...
 
 WarnIfAttribute (string conditionMember, string message)
 Constructor. More...
 
 WarnIfAttribute (string conditionMember, double compareToValue, string message)
 Constructor. More...
 
 WarnIfAttribute (string conditionMember, bool compareToValue, string message)
 Constructor. More...
 
- Public Member Functions inherited from DoIfAttribute
 DoIfAttribute (string conditionMemberName, double compareToValue)
 Base Constructor. More...
 
 DoIfAttribute (string conditionMemberName, bool compareToValue)
 Base Constructor. More...
 
 DoIfAttribute (string conditionMemberName)
 Base Constructor. More...
 

Public Attributes

string Message
 The default warning text, when a warning is shown. More...
 
int MsgType
 The default message type for this warning. 0 = None, 1 = Info, 2 = Warning, 3 = Error More...
 
string MsgProvider
 The name of any member which can be evaluted 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. More...
 
string MsgTypeProvider
 The name of any member which can be evaluted 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 More...
 
string ActionMethod
 The name of a method with no arguments and returns void, which will execute when the warning icon is clicked. More...
 
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. More...
 
- Public Attributes inherited from DoIfAttribute
string ConditionMember
 
double CompareToValue
 
DoIfCompareOperator Compare
 

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/5]

Constructor.

◆ WarnIfAttribute() [2/5]

WarnIfAttribute ( string  message)

Constructor.

Parameters
messageThe text of the info box.

◆ WarnIfAttribute() [3/5]

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() [4/5]

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() [5/5]

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.

Member Data Documentation

◆ ActionMethod

string ActionMethod

The name of a method with no arguments and returns void, which will execute when the warning icon is clicked.

◆ Message

string Message

The default warning text, when a warning is shown.

◆ MsgProvider

string MsgProvider

The name of any member which can be evaluted 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.

◆ MsgType

int MsgType

The default message type for this warning. 0 = None, 1 = Info, 2 = Warning, 3 = Error

◆ MsgTypeProvider

string MsgTypeProvider

The name of any member which can be evaluted 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

◆ UseMsgIconOnly

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.