Component:UnitSystemSwitcher

From Resonite Wiki
Revision as of 23:59, 12 September 2024 by AmasterAmaster (talk | contribs) (This is no longer a stub. Added a description, added field description, added usage description.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.

Fields
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.
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 direct DriveRef`1<SyncFieldList`1<String>> Compounds units together (example: feet and inches for height).
CompoundOverrideNames field drive of Bool Overrides the names.
CompoundSeparator field drive of String Separates the compound units.
DefaultPreset direct Preset The default preset.
ImperialPreset direct Preset The imperial preset.

Usage

Useful for unit conversions.

Examples

See Also