Page 1 of 1
What do I use instead of Localize UI?
Posted: Mon Mar 21, 2022 9:09 am
by SystemId
Hello,
I am trying to Localize my UI Text, like Main Menu Buttons / Options Popup buttons / Action Buttons.
I originally thought I was to use Text Tables, and the Localize UI component, but I see that this component is a Legacy component now.
What would be the proper way in settings up these Text Fields now? (They are TextMeshPro fields)
Re: What do I use instead of Localize UI?
Posted: Mon Mar 21, 2022 9:43 am
by Tony Li
Hi,
Use LocalizeUI. The older script, LocalizeUIText, is deprecated and is now just an alias for LocalizeUI.
Re: What do I use instead of Localize UI?
Posted: Mon Mar 21, 2022 2:16 pm
by SystemId
Oh ... I see what was going on then.
The reason I honestly posted was because I thought the Localize UI was not working (Old?). In fact it was working, but it was not doing what I thought it would do.
When I start the game, the text in my TextMeshPro - Text changes to the line in the Text Table, however, when I deactivate / reactive this Object, it seems to clear the TextField. I was Enabling / Disabling buttons and Text Objects, and this was reverting back my text.
Is there a way around this, or is this working as intended?
Re: What do I use instead of Localize UI?
Posted: Mon Mar 21, 2022 2:16 pm
by SystemId
- ignore .. somehow posted twice -
Re: What do I use instead of Localize UI?
Posted: Mon Mar 21, 2022 2:18 pm
by Tony Li
Hi,
Try setting the Localize UI's Field Name to the field name in the Text Table.
Re: What do I use instead of Localize UI?
Posted: Mon Mar 21, 2022 2:30 pm
by SystemId
That's what I've been doing. Right now I'm testing it by trying to Display my Map Name.
My problem is when I Enable / Disable "txt_LocationName" it just resets the TextInput and doesn't re-fill in whats in my TextTable. It does it only Once on game Start.
Re: What do I use instead of Localize UI?
Posted: Mon Mar 21, 2022 2:44 pm
by Tony Li
Does the same GameObject have any other TextMeshPro, TextMeshProGUI, Text, or Dropdown components?
Since Field Name is assigned, whenever LocalizeUI starts or is re-enabled it should pull the field value from the text table using this field name.