Summary
[Editor-Conditional]
Causes a float field to display a suffix to indicate what kind of units the value represents as well as
displaying it as several different fields which convert the value between different units.
- Assembly
- Animancer
.dll - Namespace
- Animancer
.Units - Base Types
-
- PropertyAttribute
- Derived Types
Syntax
[System.Diagnostics.Conditional(Strings.UnityEditor)]
public class UnitsAttribute : PropertyAttribute
Remarks
Documentation:
Units Attribute
Attributes
Type | Description |
---|---|
ConditionalAttribute |
Constructors
Name | Summary |
---|---|
UnitsAttribute |
Creates a new Animancer.Units.UnitsAttribute . |
UnitsAttribute |
Creates a new Animancer.Units.UnitsAttribute . |
UnitsAttribute |
Creates a new Animancer.Units.UnitsAttribute . |
Fields
Name | Constant Value | Summary |
---|---|---|
Multipliers |
The multipliers to convert from the field's actual value to each unit type.
|
|
Suffixes |
The unit suffix to display at the end of the value in each field.
|
|
UnitIndex |
The index of the multiplier where the field stores its actual value.
|
Properties
Name | Value | Summary |
---|---|---|
DefaultValue | float |
The value to display if the actual value is
System.Single.NaN . |
DisabledText | string |
Optional text to display instead of the regular fields when the value is
System.Single.NaN . |
IsOptional | bool |
Should the field have a toggle to set its value to
System.Single.NaN ? |
Rule | Validate |
The validation rule applied to the value.
|