Page 1 of 1

No localized text table after scene change

Posted: Mon Feb 03, 2020 11:24 pm
by VoodooDetective
My main menu has localized UI text on it. Whenever I scene change back to the main menu, I get a bunch of warnings saying:

Code: Select all

No localized text table is assigned to Game Menu Text or a UI Localized Manager component.
UnityEngine.Debug:LogWarning(Object, Object)
PixelCrushers.LocalizeUI:UpdateText() (at Assets/Plugins/Pixel Crushers/Common/Scripts/UI/LocalizeUI.cs:95)
PixelCrushers.LocalizeUI:Start() (at Assets/Plugins/Pixel Crushers/Common/Scripts/UI/LocalizeUI.cs:75)
The DialogueManager has a Text Table set and it does seem to work if I START OUT in the game menu scene, but for whatever reason if I scene change into the main menu, the Localize UI component seems to be unable to access the text table on Start().

Am I missing a step here?

Re: No localized text table after scene change

Posted: Tue Feb 04, 2020 9:11 am
by Tony Li
Hi,

On any Dialogue Manager GameObjects in any scenes, have you changed the values of Other Settings > Dont Destroy On Load? I wonder if maybe the "wrong" Dialogue Manager is surviving into the scene change, and this Dialogue Manager doesn't have a text table assigned to it.

Re: No localized text table after scene change

Posted: Tue Feb 04, 2020 2:04 pm
by VoodooDetective
So the game menu scene has a Dialogue Manager with the Don't Destroy on Load ticked. The other scene did too, but I removed it entirely to see if that helped and got the same result. Tried turning on debugging, but that didn't seem to help.

It seems like it's a race condition because when I navigate back to the menu scene, only the two first visible text options throw that warning. Once I open other localized menus further along in this "timeline," those menu items are able to find the text table.

Re: No localized text table after scene change

Posted: Tue Feb 04, 2020 2:17 pm
by Tony Li
If that's the case, you should be able to resolve the race condition by adding a UILocalizationManager component to the Dialogue Manager and assigning the text table to it. (The same text table that's assigned to the DialogueSystemController component.)

Re: No localized text table after scene change

Posted: Tue Feb 04, 2020 3:03 pm
by VoodooDetective
That did it! Thanks so much!!

Re: No localized text table after scene change

Posted: Tue Feb 04, 2020 3:06 pm
by Tony Li
Glad to help!