Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Populate strings with data using Sources

Browse the sources that evaluate a placeholder's selectors to produce the value to format.
Read time 1 minuteLast updated 13 days ago

Browse the sources that evaluate a placeholder's selectors to produce the value to format.
A source evaluates the selectors in a Smart String placeholder and produces the value that a formatter then converts to text. Each registered source is tried in order until one handles the selector, so the order of sources can change the result. Refer to Smart Strings settings for information on how to configure the order in which sources are tried.
The following sources are available, and you can add your own.

Source

Description

Default sourceSelects arguments by numeric index, like
String.Format
.
Dictionary sourceLooks up keys in a dictionary.
Key value pair sourceReads the
Key
and
Value
of a
KeyValuePair
.
Persistent variables sourceSupplies named variables from a variables group asset.
Properties sourceReads members by name through the Unity.Properties data model.
String sourceExposes string operations such as case conversion and trimming.
Create a custom sourceWrite your own source for custom selector logic.

Additional resources