Recall by code

Hi,
I’m creating a text adventure.
I would like the “key” and therefore the “string rafarance” to be chosen by code, passed by a string variable.

How can I recall this?

I am using the “Localize string event”

I’ll explain:
I have several “ScriptableObject Room”, each with a unique “key” variable, so that when the “room” is loaded, this “key” is passed to the tool that is currently placed on a GameObject GameController.

I should do something like:
StringRafarance = roomNavigation.currentRoom.KeyRoom;

Sorry for the stupid question, I’m learning.

Edit: Question for the future, this recall will be similar to when I have to make the end user choose the language, right?

You can just change the TableReference and TableEntryReference values, this will trigger an update.

You could also change the ScriptableObject to use a LocalizedString as your key.

There are examples of changing the LocalizeStringEvent here Class LocalizeStringEvent | Localization | 1.0.5

Ths for all