Version: Unity 6.7 Alpha (6000.7)
Language : English
Create a custom source
Choose formatter

Use Formatters to apply logic to strings

Browse the formatters that convert a selected value into text in a Smart String.

A formatter converts the value produced by the sources into its final text, applying logic such as pluralization, lists, or conditional output. Apply a formatter explicitly by name, or omit the name to let a formatter that supports automatic detection apply implicitly. The following formatters are available, and you can add your own.

Formatter Description
Choose formatter Picks an output by matching the value against a set of options.
Conditional formatter Picks an output based on the value’s type and value.
Default formatter Converts the value with ToString and the active culture.
Is Match formatter Picks an output based on a regular expression match.
List formatter Formats each item in a list, with separators.
Null formatter Picks an output based on whether the value is null.
Plural formatter Picks a word form based on a count and the culture’s plural rules.
Sub string formatter Extracts a substring of the value.
Template formatter Applies a reusable named template.
Time formatter Formats a TimeSpan as localized text.
Create a custom formatter Write your own formatter.

Additional resources

Create a custom source
Choose formatter