Hi,
I'm currently evaluating Dialogue System and have encountered a problem I can't seem to fix.
I use a (custom) Unity UI wired together with the UnityUIDialogueUI script. There are 3 response buttons.
In a dialogue, when I have custom lua bound methods evaluating the validity of a response, I only see the button in inactive state, when the order of links is in a certain way:
I DO see the button in state inactive, when the methods evaluate in the order false (custom method with parameter 1), true (custom method with parameter 2) and no condition -> I see all three buttons.
I do not see the button at all (the whole game object is inactive in the hierarchy) when the order of links results in true (custom method with parameter 2), false (custom method with parameter 1) and no condition -> I only see two buttons, where I expect to see a valid option, an invalid option and a valid option in that order.
I can't seem to find the fix for this, can you enlighten me?
Thanks in advance!
Response button not displayed in a condition scenario
Re: Response button not displayed in a condition scenario
Hi,
Thanks for checking out the Dialogue System!
Here are some things to check. From your description, they probably won't be the solution, but it'll be good to check them first.
but if the Conditions evaluate to false, you'll see a line like this:
Note that these will appear in the log before the previous line is displayed. This is because the Dialogue System has to evaluate conditions one level ahead in order to know how to handle certain continue button modes.
If that doesn't help, would you please post a screenshot of your UnityUIDialogueUI component in which the Response Menu foldout is fully expanded in the Inspector?
Thanks for checking out the Dialogue System!
Here are some things to check. From your description, they probably won't be the solution, but it'll be good to check them first.
- If any of the linked nodes are assigned to an NPC (i.e., gray node instead of blue), the Dialogue System will choose that node instead of showing a player response menu. NPC nodes always take precedence.
- If you've changed the Priority value on any of the link arrows, the Dialogue System will stop evaluating links as soon as it finds a priority level that has at least one valid link.
- If you've changed a node's False Condition Action or Is Group checkbox, this may change the way the Dialogue System handles it. If this is the case, please let me know.
Code: Select all
Dialogue System: Add link 'dialogue text' (Lua condition)
Code: Select all
Dialogue System: Block on false condition 'dialogue text' (Lua condition)
If that doesn't help, would you please post a screenshot of your UnityUIDialogueUI component in which the Response Menu foldout is fully expanded in the Inspector?
Re: Response button not displayed in a condition scenario
Hi,
Thanks for checking back so quickly!
I've checked that the linked nodes are all configured nicely and as described. I've been trying to switch all kinds of settings before writing the post, to no avail. So, they should be good as far as I can tell
The three relevant lines I can identify from the Info-level output look good to me as well:
... where only buttons for 'Option One' and 'Attack' are active (with Option One being non-interactable).
When not having lua conditions on the nodes, three or four buttons display nicely and as expected.
Here's a screenshot of the Response Menu: In the DialogueManager settings, I chose to never use Continue Buttons and always display invalid options, ofc.
Cheers and thanks once more.
Edit:
I just played with the Button Alignment option. When I chose 'To First', none of the invalid options' buttons was displayed anymore. Maybe that helps finding the problem?
Thanks for checking back so quickly!
I've checked that the linked nodes are all configured nicely and as described. I've been trying to switch all kinds of settings before writing the post, to no avail. So, they should be good as far as I can tell
The three relevant lines I can identify from the Info-level output look good to me as well:
Code: Select all
Dialogue System: Add Link (Player): ID=3:12 'Option One' (False)
Dialogue System: Add Link (Player): ID=3:13 'Option Two' (False)
Dialogue System: Add Link (Player): ID=3:14 'Attack' (True)
When not having lua conditions on the nodes, three or four buttons display nicely and as expected.
Here's a screenshot of the Response Menu: In the DialogueManager settings, I chose to never use Continue Buttons and always display invalid options, ofc.
Cheers and thanks once more.
Edit:
I just played with the Button Alignment option. When I chose 'To First', none of the invalid options' buttons was displayed anymore. Maybe that helps finding the problem?
Re: Response button not displayed in a condition scenario
Aha, this is an issue with positioned buttons (i.e., in the Buttons list) and showing non-clickable buttons. When the response menu assigns buttons, the current algorithm uses the first available button that's not yet clickable. I need to update it to ignore non-clickable buttons that have already been assigned.
I'll post a fix here at my soonest opportunity later today.
I'll post a fix here at my soonest opportunity later today.
Re: Response button not displayed in a condition scenario
That's great news, thanks in advance!
Just out of curiosity, if I had bought the package (and the sources) already, would I have been able to do the fix on my own? It kinda sounds like a small detail problem that wouldn't require a major refactoring, after all?
Again, thanks for your quick replies! That was great, and besides that one detail that bugged me, my experience with both the library and it's documentation was marvelous!
Just out of curiosity, if I had bought the package (and the sources) already, would I have been able to do the fix on my own? It kinda sounds like a small detail problem that wouldn't require a major refactoring, after all?
Again, thanks for your quick replies! That was great, and besides that one detail that bugged me, my experience with both the library and it's documentation was marvelous!
Re: Response button not displayed in a condition scenario
Hi,
Thanks! I'm glad your experience has been good. Sorry again about the bug, and thank you for letting me know!
You can download the fix here: UnityUI_Support_2016-03-24.unitypackage or on the Dialogue System Extras page. All packages on the Dialogue System Extras page also work with the evaluation version.
And, yes, you would have been able to do the fix on your own. It was a one-line fix in UnityUIResponseMenuControls.cs.
Thanks! I'm glad your experience has been good. Sorry again about the bug, and thank you for letting me know!
You can download the fix here: UnityUI_Support_2016-03-24.unitypackage or on the Dialogue System Extras page. All packages on the Dialogue System Extras page also work with the evaluation version.
And, yes, you would have been able to do the fix on your own. It was a one-line fix in UnityUIResponseMenuControls.cs.
Re: Response button not displayed in a condition scenario
Super sweet, it worked right on the spot and just like expected! Thank you very much for the great support, you've gotten yourself a very convinced and happy customer here! =)
Re: Response button not displayed in a condition scenario
Great to hear! Thanks!