Photon Fusion 1.1.9

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

Unit Attribute class. Used to mark a field with the respective Fusion.Units More...

Inherits PropertyAttribute.

Public Member Functions

 UnitAttribute (Units unit)
 Specify the field Fusion.Units type, without Min and Max values.
 
 UnitAttribute (Units unit, double min, double max)
 Specify the field Fusion.Units type, and its Min and Max values.
 

Public Attributes

bool ClampMax
 If entered values above this Max should be clamped.
 
bool ClampMin
 If entered values below this Min should be clamped.
 
int DecimalPlaces = 5
 The rounding used by the value slider.
 
int InverseDecimalPlaces = 5
 The rounding used by the inverse slider (if UseInverse is enabled).
 
string InverseName
 The label used for the inverse field (if used).
 
Units InverseUnit
 The Units used for the inverse, as they will be different than the primary field.
 
bool UseInverse
 Displays 1/value as a second field.
 
bool UseSlider
 Set to false to override the effect of setting the min or max range values, and prevent the slider from being used. Useful for cases where a min/max is desired for clamping, but a slider range is not appropriate.
 

Detailed Description

Unit Attribute class. Used to mark a field with the respective Fusion.Units

Constructor & Destructor Documentation

◆ UnitAttribute() [1/2]

UnitAttribute ( Units  unit)

Specify the field Fusion.Units type, without Min and Max values.

Parameters
unitUnit type

◆ UnitAttribute() [2/2]

UnitAttribute ( Units  unit,
double  min,
double  max 
)

Specify the field Fusion.Units type, and its Min and Max values.

Parameters
unitUnit type
minMin value for this field
maxMax value for this field
clampIf values outside of the min/max range will get clamped, or be allowed.