Page 1 of 1

Changing language at Runtime

Posted: Mon Feb 17, 2020 11:40 am
by TilmanAtChatterbug
Hi,

In our game there is a start scene on which you can decide which language to start a mini game with. We want to switch audio files and for that we are using AudioWait(entrytaglocal); as the default option. Before loading the mini game we use DialogueManager.SetLanguage( ###ourspecificstring###); This only works one scene load after we changed the language.

So the game starts with de_s by default. I press start into the scene with de_f. The audio that plays is still de_s. I go back to start scene and then start into either de_s or de_f. Regardless of wich scene I start into it now is de_f (one scene load to late) and just like that changing the language always is one scene load behind me switching it. I tried waiting a bit between switching language and loading the scene but that did not work either. Maybe there is a boolean I need to check when waiting? Did not find the instructions for this situation in the manual.

Cheers,
Tilman

Re: Changing language at Runtime

Posted: Mon Feb 17, 2020 12:54 pm
by Tony Li
Hi,

On your Dialogue Manager, are Other Settings > Allow Only One Instance and Don't Destroy On Load both ticked?

Try adding a UILocalizationManager component to the Dialogue Manager. This may fix the issue by itself.

Re: Changing language at Runtime

Posted: Mon Feb 17, 2020 2:31 pm
by TilmanAtChatterbug
Thanks! I had triple-checked everything but it would not work... However after I went home and made tomato sauce none of your advice helped so I checked everything again and again and then suddendly understood how I produced the issue myself... Sorry for bothering you before taking a sufficiently long break!

Re: Changing language at Runtime

Posted: Mon Feb 17, 2020 2:51 pm
by Tony Li
You had to check the sauce code, eh? ;)