Get started

1

To get started with the asset, import it into your Unity project via the Package Manager.

2

Now you need to configure the central script, which is available in two versions:

a) MonoBehaviour version – added to the scene and used by text components via singleton access. 
b) ScriptableObject version – configured as an "asset" file in the Resources folder, accessible via singleton across all scenes in the entire project, including for localizing Editor interfaces.

3

Both versions — A and B — use their own types of localizators, which inherit from the LocBase<,> class.
For example:

public sealed class TextMeshLocalizatorScriptable : LocBase<TMP_Text, DALocalizatorScriptable>

The first generic type TMP_Text indicates that this component will localize TextMesh text components located on the same GameObject.
 The second generic type DALocalizatorScriptable means that to perform localization, the script will refer to the Scriptable Localizator asset, e.g. "DALocalizatorScriptable.asset".

public sealed class UITextLocalizator : LocBase<Text, DALocalizator>

The first generic type Text indicates that this component will localize UI.Text components located on the same GameObject.
 The second generic type DALocalizator means that localization will be performed by referring to a Mono Localizator, such as "DALocalizator" placed in your scene.

Last updated