Page 1 of 1

Dialogue language changing on release version, but correct on play in unity editor

Posted: Sun Mar 05, 2023 9:20 pm
by ZeroElementGames
Hi!
we are using dialogue system for our dialogues, and we have our dialogues in english and spanish. when in play on unity, dialogues show correctly on the selected language, but when we create a release, they always show on spanish. Do you know why would that happen? Here you can see the dialogue system controller configuration on localization , how we put it on each dialogue, and the text table.
I have no idea why when we generate a release, it changes the language, but in play it displays english correctly, and we need it in english to send it :/
Thanks for everything!

Re: Dialogue language changing on release version, but correct on play in unity editor

Posted: Mon Mar 06, 2023 8:14 am
by Tony Li
Hi,

When you play (in the Unity editor or in a build), the current language selection is stored in PlayerPrefs. The Unity editor uses a different PlayerPrefs from builds. The Spanish language selection is probably stored in the build's PlayerPrefs. If your build has an options menu, you can change the language there. Otherwise you can use a line of C# to clear the PlayerPrefs setting, in which case it will use the default language (i.e., English in your project):

Code: Select all

PlayerPrefs.DeleteKey("Language");

Re: Dialogue language changing on release version, but correct on play in unity editor

Posted: Mon Mar 06, 2023 10:31 am
by ZeroElementGames
That was it! thank you very much tony :D

Re: Dialogue language changing on release version, but correct on play in unity editor

Posted: Mon Mar 06, 2023 12:43 pm
by Tony Li
Glad to help!