Use smartstring runtime

Hi !

I use a function to get a string from my tables with a key that i found on the web, it work exactly like i was hopping but i was wondering how to i use smart string with it :

public string GetDescription(string dataBase, string descriptionKey)
    {
        var operation = LocalizationSettings.StringDatabase.GetLocalizedStringAsync(dataBase, descriptionKey);
        string result = "";
        if (operation.IsDone)
            result = operation.Result;
        else
            operation.Completed += t => result = t.Result;

        return result;
    }

Thanx :slight_smile:

What does your string look like? You just need to mark it as Smart in the editor and then pass in the arguments into GetLocalizedStringAsync(table, key, arguments)

Thanx a lot that was i was looking for ! :slight_smile:

1 Like