Controller inputSettings.cancel.key problem.

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
wlchfl5359
Posts: 29
Joined: Sat Jan 02, 2021 4:27 pm

Controller inputSettings.cancel.key problem.

Post by wlchfl5359 »

Hi,
I'm using
if (Gamepad.all.Count > 0) DialogueManager.instance.displaySettings.inputSettings.cancel.key = KeyCode.JoystickButton2;
else DialogueManager.instance.displaySettings.inputSettings.cancel.key = KeyCode.F;

to show next conversation or end.

Keyboard works very well.
So when conversation ends or start, it calls OnConversationEnded and OnConversationStarted.
But when I use Controller and finish conversation, it calls OnConversationEnded and Call OnConversationStarted again.
So conversation starts again.
It is same when i start conversation too. it calls OnConversationStarted and OnConversationEnded too.
Only it happens when i use Controller.

What is problem??
Thank you.
User avatar
Tony Li
Posts: 21962
Joined: Thu Jul 18, 2013 1:27 pm

Re: Controller inputSettings.cancel.key problem.

Post by Tony Li »

Hi,

The Dialogue Manager's Input Settings > Cancel inputs are used to cancel subtitles and/or conversations. If you just want to advance the conversation, I recommend using continue buttons instead. Set the Cancel Subtitle Input and Cancel Conversation Input values to None. Set the Dialogue Manager's Subtitle Settings > Continue Button dropdown to Always. You can also tick the Input Device Manager's Always Auto Focus to ensure that the continue button is focused (selected) so the EventSystem's Submit input clicks it when you press the gamepad's Submit input. If you don't want to show a visible continue button see How To: Continue Without UI Button. More info also here: How To: Continue With Special Key/Button
wlchfl5359
Posts: 29
Joined: Sat Jan 02, 2021 4:27 pm

Re: Controller inputSettings.cancel.key problem.

Post by wlchfl5359 »

Thank you very much!!!!!!!!

I used GetComponentInParent<AbstractDialogueUI>().OnContinue(); in 4th way.

Now controller works very well!! also keyboard too.

Thank you!!
User avatar
Tony Li
Posts: 21962
Joined: Thu Jul 18, 2013 1:27 pm

Re: Controller inputSettings.cancel.key problem.

Post by Tony Li »

Glad to help!
Post Reply