Photon Fusion 2.0.0

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

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 DoIfAttributeBase.

Public Member Functions

 WarnIfAttribute (string propertyPath, bool compareToValue, string message, CompareOperator compare=CompareOperator.Equal)
 
 WarnIfAttribute (string propertyPath, double compareToValue, string message, CompareOperator compare=CompareOperator.Equal)
 
 WarnIfAttribute (string propertyPath, long compareToValue, string message, CompareOperator compare=CompareOperator.Equal)
 
 WarnIfAttribute (string propertyPath, string message)
 

Public Attributes

bool AsBox
 
string Message
 The default warning text, when a warning is shown.
 
- Public Attributes inherited from DoIfAttributeBase
double _doubleValue
 
bool _isDouble
 
long _longValue
 
CompareOperator Compare
 
string ConditionMember
 
bool ErrorOnConditionMemberNotFound = true
 

Additional Inherited Members

- Protected Member Functions inherited from DoIfAttributeBase
 DoIfAttributeBase (string propertyPath, double compareToValue, CompareOperator compare)
 
 DoIfAttributeBase (string propertyPath, long compareToValue, CompareOperator compare)
 

Detailed Description

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