I try to dynamicaly change a localized text with this methode :
private void SetWorldMessage(string key)
{
LocalizedString localizedString = new(TABLE_REFERENCE, key)
{
{ WORLD_MESSAGE_ARGUMENT, currentWave }
};
worldMessageEvent.StringReference = localizedString;
worldMessageEvent.StringReference.RefreshString();
}
The two texts take the same parameter.
It works only on the first call. It shows that my table references, key and argument are correctly initialized but the text won’t change and the value is not updated.
worldMessageEvent is a LocalizeStringEvent :
enter image description here
Any idea what’s wrong ?
I tried to initialized two LocalizedString and use it instead of building it. But no luck, even the first time.