mNo edit summary |
add some more info to try to help |
||
Line 3: | Line 3: | ||
|Name=Quantity Text Format Driver`1 | |Name=Quantity Text Format Driver`1 | ||
}} | }} | ||
The QuantityTextFormatDriver allows driving a string with an auto formatted quantity. | The QuantityTextFormatDriver allows driving a string with an auto formatted quantity. | ||
== | == Fields == | ||
{{Table ComponentFields | {{Table ComponentFields | ||
|Target|{{RootFieldType|FieldDrive`1|[[Type:String|String]]}}|TypeAdv0=true| | |Target|{{RootFieldType|FieldDrive`1|[[Type:String|String]]}}|TypeAdv0=true| The field to drive with the formatted Quantity string. | ||
|BaseValue|Double|Value to get converted into string | |BaseValue|Double|Value to get converted into string | ||
|FormatUnit|String|Unit to format BaseValue in. | |FormatUnit|String|Unit to format BaseValue in. | ||
|FormatNumber|String| | |FormatNumber|String| How to format the number when making it part of the string (So if it should remove decimals. | ||
|CompoundFormatUnits|{{RootFieldType|SyncFieldList`1|[[Type:String|String]]}}|TypeAdv4=true| | |CompoundFormatUnits|{{RootFieldType|SyncFieldList`1|[[Type:String|String]]}}|TypeAdv4=true| | ||
|CompoundUseLongNames|Bool|Show the long names of compound units. | |CompoundUseLongNames|Bool|Show the long names of compound units. |
Revision as of 20:41, 7 February 2025
Component image 
Quantity Text Format Driver`1 component as seen in the Scene Inspector

The QuantityTextFormatDriver allows driving a string with an auto formatted quantity.
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. Some components stop their functionality when this field is disabled, but some don't. |
Target
|
field drive of String | The field to drive with the formatted Quantity string. |
BaseValue
|
Double | Value to get converted into string |
FormatUnit
|
String | Unit to format BaseValue in. |
FormatNumber
|
String | How to format the number when making it part of the string (So if it should remove decimals. |
CompoundFormatUnits
|
direct SyncFieldList`1<String> | |
CompoundUseLongNames
|
Bool | Show the long names of compound units. |
CompoundOverrideNames
|
Bool | |
CompoundDiscardLastFraction
|
Bool | |
CompoundSeparator
|
String | String to put between compound units. |
CompoundZeroHandling
|
CompoundZeroHandling | Remove or trim compound units with a value of zero. |
Behavior
The most suitable unit type is automatically chosen based on the BaseValue, you can override this behavior by inputting a unit type into FormatUnit or using compound units.