formatString
The format string used to define how numeric values are displayed. The string follows standard.NET formatting conventions.
Read time 1 minuteLast updated 4 days ago
Definition
- Type: Property
- Namespace: UnityEngine.UIElements
- Assembly: UnityEngine.UIElementsModule
public string formatString { get; set; }
Remarks
The supported numeric formats string (using as an example) are:
0- : Displays the numeric value with up to one decimal place, omitting trailing zeros. For example,
"0.#"becomes3.5and3.5becomes3.0.3
-: Ensures the numeric value is displayed with exactly two decimal places. For example, is displayed as and as .
"0.00"3.53.5033.00-: Displays only the integer part of a numeric value, rounding if necessary. For example, becomes and becomes .
"0"3.543.03