Format String
Create a formatted string from a template with numbered placeholders.
Parameters
| Parameter | Description |
|---|---|
| Format | The template string, such as Hello {0} or HP: {0}/{1}. |
| Strings | Values used to fill the placeholders in order. |
| Result | Stores the formatted output string. |
What It Does
Format String uses a format template and replaces placeholders like {0}, {1}, and {2} with values from the Strings array.
This is often the clearest way to build UI text when the text has a fixed pattern but the values change at runtime.
Example
Use Format String to build a status label:
- Set
FormattoWave {0} - Enemies Left: {1}. - Add the current wave number and enemy count as strings in the same order.
- Store the result in a UI text variable.
Notes
- The placeholder numbers must match the positions of the values in
Strings. - In the editor, the action checks for missing or extra parameters and warns about invalid format strings.
- Use Build String when you want a simple separator-based join instead of numbered placeholders.