UGTK cat mascotUGTKengine within an engine Request access

UGTK / Toolkit / Ui Module / Text Updater System Completed

Ui Module — UGTK

Text Updater System

Summary

The TextUpdaterSystem is a utility for dynamically updating UI text elements in Unity using TextMeshPro. It allows for real-time reflection of variable values from specified MonoBehaviour components, supporting both public and non-public fields and properties.


Content


Modules Dependencies

The TextUpdaterSystem module requires the following dependencies:

Ensure that these dependencies are correctly imported and configured in your project.


Setup

To set up the TextUpdaterSystem, follow these steps:

  1. Add the TextTupdater to your scene:

  1. Configure the TextUpdater:
  2. Assign the target MonoBehaviour that contains the variable you want to monitor.
  3. Specify the variableName that corresponds to the field or property within the target MonoBehaviour.
  4. Optionally, add a prefix to the displayed text.
  5. Optionally, add a suffix to the displayed text.


Testing Scene

Good to know:

Number Format 419.4894 becomes
(empty) 419,4894
F0 419
F2 419,49
N0 419 with thousands separators on larger values
0.## 419,49, and a whole number stays whole

It applies to numeric types only — a string or a bool is untouched — and a malformed format falls back to ToString() rather than throwing. - Use Invariant Culture forces the decimal point instead of the device's separator. Turn it on for a value that must look identical everywhere (a version, an id, a debug readout); leave it off for a number the player reads, so it follows their locale. - prefix and suffix are plain concatenation: remember the leading space in a suffix like " ms".


Technical Info

The following are the main scripts and workflow of the TextUpdaterSystem:

Scripts:


© 2026 Marcello De Bonis. All rights reserved

Real dependenciesOpen in the map →

Measured from the repository: code references (asmdef) plus prefab and asset GUIDs. Importing this module alone brings in 1 module in total.