Customize the settings that control the project’s default Smart String formatter, including case sensitivity, error handling, and the active sources and formatters.
Open these settings from the main menu (Edit > Project Settings > Smart Strings), or by selecting a Smart Strings Settings asset in the Project window. The first time you open the page, select Create to make a settings asset. The settings define the default SmartFormatter reached at runtime through Smart.Project, and the asset is included in player builds. To set these values in code instead, refer to Configure Smart Strings.
The Smart Strings settings contain the following sections.
| Setting | Description |
|---|---|
| Case Sensitivity | Determines how selector and formatter names are matched. The following options are available:
|
| Setting | Description |
|---|---|
| Error Action | Sets how the parser responds to an invalid format string. The following options are available:
|
| Convert Character String Literals | Interprets character escapes such as \n and \t in the format string. Enabled by default. Refer to the escaping note in Smart Strings. |
| Custom Selector Chars | Lists extra characters allowed in selectors, beyond letters, digits, _, and -. Use Add (+) and Remove (−) to edit the list. |
| Custom Operator Chars | Lists extra characters treated as selector operators, in addition to . and ?.. Use Add (+) and Remove (−) to edit the list. |
| Setting | Description |
|---|---|
| Error Action | Sets how a formatter responds when it can’t format a value. Has the same options as the parser Error Action, and defaults to Throw Error. Refer to Handle formatting errors. |
| Alignment Fill Character | Sets the character used to pad a value to its alignment width, for example {value,10}. Defaults to a space. |
The Sources list holds the sources the formatter tries, in order, to evaluate a placeholder’s selectors. The order matters: each source is tried from the top until one handles the selector.
Refer to the source pages, such as Default, Properties, Dictionary, and String.
The Formatters list holds the formatters the formatter tries, in order, to convert a value to text. As with sources, the order matters for implicitly applied formatters.
Refer to the formatter pages, such as Choose, Plural, List, and Conditional.