Class NumericValueDisplay
Displays a formatted numeric value in a TextMeshPro UI element and controls its visibility.
public class NumericValueDisplay : MonoBehaviour
Inheritance
Remarks
Used primarily as a countdown timer driven by TrafficSignalMixer — when a
traffic-light clip has IndicateTime enabled, the remaining clip duration is pushed
here each frame so participants can see how long until the signal changes. The configurable
stringFormat field lets designers control decimal precision per light without code.
Methods
SetValue(float)
Sets the numeric value to be displayed in the text component using the configured format string.
public void SetValue(float value)
Parameters
| Name | Type | Description |
|---|---|---|
value | float | The numeric value to display. |
SetValue(float, string)
Sets the numeric value to be displayed in the text component using a provided format string.
public void SetValue(float value, string customFormat)
Parameters
| Name | Type | Description |
|---|---|---|
value | float | The numeric value to display. |
customFormat | string | The format string used to convert the value into a text representation. |