Problem after setting language

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Fenris
Posts: 4
Joined: Wed Sep 23, 2015 5:25 am

Problem after setting language

Post by Fenris »

Hi

I just added a language to some conversations. I'm using a Dialogue System Trigger (OnEnable) to start the relevant conversations (I set the conversation property), and that has been working fine with the default language. However when I set the language with DialogueManager.SetLanguage() my system stops working. I can see that that the conversations switch to the right language but they don't get triggered. If I don't set the language everything triggers as normal. I'm using ver. 1.6.8.

I spent a couple of hours trying to get to the bottom of this but I can't figure out what's wrong. Can you give me some clues? Thank in advance.

Best regards

J
User avatar
Tony Li
Posts: 22062
Joined: Thu Jul 18, 2013 1:27 pm

Re: Problem after setting language

Post by Tony Li »

Hi,

As a test, what if you set the Dialogue Manager's Display Settings > Localization Settings > Language instead of using DialogueManager.SetLanguage()? Does it trigger correctly?

Does your Dialogue System Trigger have conditions? If so, at runtime does it show a green True or a red False?

If you haven't already, try setting the Dialogue Manager's Debug Level to Info. Then reproduce the issue. The Console window may contain some details that point out the issue.

Feel free to send a reproduction project to tony (at) pixelcrushers.com. I'll be happy to take a look.
Fenris
Posts: 4
Joined: Wed Sep 23, 2015 5:25 am

Re: Problem after setting language

Post by Fenris »

Hi Tony

Thanks for your quick reply. Your suggestions made it easy for me to find the problem. I had added the language setup buttons at the beginning of the game before the prefab with the Dialogue Manager was instantiated, So my DialogueManager.SetLanguage() call made an empty Dialogue Manager appear in a DoNotDestroyOnLoad scene and that made everything go south.

Stupid mistake on my part. I really appreciate your assistance.

Best regards

J
User avatar
Tony Li
Posts: 22062
Joined: Thu Jul 18, 2013 1:27 pm

Re: Problem after setting language

Post by Tony Li »

Glad you got to the bottom of it. Given customer feedback, in hindsight I should have made the Dialogue Manager a non-self-instantiating instance rather than a true singleton. In most cases, it would be more helpful for DialogueManager.SetLanguage() to fail with an error if there's no Dialogue Manager, rather than self-instantiating a generic Dialogue Manager. That change is on the "Dialogue System 2.0" wish list. :-)
Post Reply