Getting raw text from table (before Smart text)

Hello,

I have a keyword system in my game and I would like to identify when a text has a specific variable in it.
Example : “Put all ennemies on {Fire}”
I’d like to get the text (string) in a script without smart replacing the variable.
So I can identify all the text where Fire is mentioned and for example create a fire tooltip for the player to read.

Thank you for your help!
Have a nice day

You can get the table entry.

var sd = LocalizationSettings.StringDatabase;
var table = sd.GetTableAsync("UIText");
yield return table;
 
var entry = table.Result.GetEntry("entry name");

The table can also give you access to all entries if you want to check them all.

1 Like

Thank you! it works. I still have a small problem, if the user language is set to a locale which doesn’t have a translation, it won’t return the fallback local text but will return null. How can I select english in GetTableAsync(), or how can it accept fallback automatically?

Use SD.GetTableEntry, this supports fallbacks

1 Like