Localize UI when loading game
Posted: Fri Dec 29, 2023 3:33 am
Hi,
I had a little problem with the Localize UI component when loading a game. For the items, I have an "Item_Container" which is a prefab. When the game is loaded, a Custom Saver runs a function that instantiates all the Items saved. When I run the game and load a save file, the items instantiate correctly, but the name and description appear with their Text Table name instead of the localized text. But If I go back to the Main menu and load the game again, the items appear correctly with their localized name.
At first, I thought this was a problem about trying to access the table before it was loaded, but this problem persists even if I wait for the scene to be completely loaded to instantiate the items.
Finally, if the player gets a new Item during gameplay the problem is the same. If the game was loaded for the first time, the new items do not have localized text. But if the game was loaded for a second time the items have their localized text correctly.
As always, thanks in advance.
I had a little problem with the Localize UI component when loading a game. For the items, I have an "Item_Container" which is a prefab. When the game is loaded, a Custom Saver runs a function that instantiates all the Items saved. When I run the game and load a save file, the items instantiate correctly, but the name and description appear with their Text Table name instead of the localized text. But If I go back to the Main menu and load the game again, the items appear correctly with their localized name.
At first, I thought this was a problem about trying to access the table before it was loaded, but this problem persists even if I wait for the scene to be completely loaded to instantiate the items.
Finally, if the player gets a new Item during gameplay the problem is the same. If the game was loaded for the first time, the new items do not have localized text. But if the game was loaded for a second time the items have their localized text correctly.
As always, thanks in advance.