Component image 
Unit System Switcher component as seen in the Scene Inspector

The UnitSystemSwitcher component takes in one quantity type and converts it to another as a string. This is commonly used to make editors easily able to take any unit input and automatically know which one the user is referring to.
Name | Type | Description |
---|---|---|
persistent
|
Bool | Determines whether or not this item will be saved to the server. |
UpdateOrder
|
Int | Controls the order in which this component is updated. |
Enabled
|
Bool | Controls whether or not this component is enabled. Some components stop their functionality when this field is disabled, but some don't. |
DefaultUnit
|
field drive of String | Changes the default unit to show in the text (especially if the FormatUnit is incorrect).
|
FormatUnit
|
field drive of String | The unit to show in the text. |
FormatNumber
|
field drive of String | Formats the string. |
CompoundFormatUnits
|
reference drive of SyncFieldList`1<String> | Compounds units together (example: feet and inches for height). |
CompoundOverrideNames
|
field drive of Bool | Overrides the names. |
CompoundUseLongNames
|
field drive of Bool | |
CompoundSeparator
|
field drive of String | Separates the compound units. |
DefaultPreset
|
direct UnitSystemSwitcher.Preset | The default preset. |
ImperialPreset
|
direct UnitSystemSwitcher.Preset | The imperial preset. |
Preset
Name | Type | Description |
---|---|---|
DefaultUnit
|
String | The default unit for this unit type. |
FormatUnit
|
String | The unit to show in the text. |
FormatNumber
|
String | How to format the string. |
CompoundFormatUnits
|
direct SyncFieldList`1<String> | A list of compound format units from a unit configuration. |
CompoundSeparator
|
String | The Separator for compound units for this preset. |
CompoundOverrideNames
|
Bool | Overrides the names. |
CompoundUseLongNames
|
Bool | Whether compound units should use long names (So millimeters vs mm) |
Usage
Useful for unit conversions.
Examples
This article or section is a Stub. You can help the Resonite Wiki by expanding it.