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

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
ZeroElementGames
Posts: 13
Joined: Tue May 25, 2021 7:18 pm

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

Post 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!
Attachments
dialoguesconfig.png
dialoguesconfig.png (105.3 KiB) Viewed 187 times
dialoguephraseconfig.png
dialoguephraseconfig.png (10.84 KiB) Viewed 187 times
textable.png
textable.png (8.42 KiB) Viewed 187 times
User avatar
Tony Li
Posts: 21684
Joined: Thu Jul 18, 2013 1:27 pm

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

Post 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");
ZeroElementGames
Posts: 13
Joined: Tue May 25, 2021 7:18 pm

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

Post by ZeroElementGames »

That was it! thank you very much tony :D
User avatar
Tony Li
Posts: 21684
Joined: Thu Jul 18, 2013 1:27 pm

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

Post by Tony Li »

Glad to help!
Post Reply