Version: Unity 7.0 Alpha (7000.0)
Language : English
Smart Strings performance
Default source

Populate strings with data using Sources

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 source Selects arguments by numeric index, like String.Format.
Dictionary source Looks up keys in a dictionary.
Key value pair source Reads the Key and Value of a KeyValuePair.
Persistent variables source Supplies named variables from a variables group asset.
Properties source Reads members by name through the Unity.Properties data model.
String source Exposes string operations such as case conversion and trimming.
Create a custom source Write your own source for custom selector logic.

Additional resources

Smart Strings performance
Default source
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961