Changing language at Runtime

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
TilmanAtChatterbug
Posts: 4
Joined: Thu Feb 13, 2020 11:01 am

Changing language at Runtime

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

Re: Changing language at Runtime

Post 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.
TilmanAtChatterbug
Posts: 4
Joined: Thu Feb 13, 2020 11:01 am

Re: Changing language at Runtime

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

Re: Changing language at Runtime

Post by Tony Li »

You had to check the sauce code, eh? ;)
Post Reply