What do I use instead of Localize UI?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
SystemId
Posts: 30
Joined: Thu Aug 08, 2019 1:31 pm

What do I use instead of Localize UI?

Post 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)
User avatar
Tony Li
Posts: 22149
Joined: Thu Jul 18, 2013 1:27 pm

Re: What do I use instead of Localize UI?

Post by Tony Li »

Hi,

Use LocalizeUI. The older script, LocalizeUIText, is deprecated and is now just an alias for LocalizeUI.
SystemId
Posts: 30
Joined: Thu Aug 08, 2019 1:31 pm

Re: What do I use instead of Localize UI?

Post 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?
SystemId
Posts: 30
Joined: Thu Aug 08, 2019 1:31 pm

Re: What do I use instead of Localize UI?

Post by SystemId »

- ignore .. somehow posted twice -
Last edited by SystemId on Mon Mar 21, 2022 2:18 pm, edited 1 time in total.
User avatar
Tony Li
Posts: 22149
Joined: Thu Jul 18, 2013 1:27 pm

Re: What do I use instead of Localize UI?

Post by Tony Li »

Hi,

Try setting the Localize UI's Field Name to the field name in the Text Table.
SystemId
Posts: 30
Joined: Thu Aug 08, 2019 1:31 pm

Re: What do I use instead of Localize UI?

Post 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.
Attachments
Localize01.JPG
Localize01.JPG (82.34 KiB) Viewed 874 times
User avatar
Tony Li
Posts: 22149
Joined: Thu Jul 18, 2013 1:27 pm

Re: What do I use instead of Localize UI?

Post 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.
Post Reply