Issues with rewired ui submit button

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Omniclause
Posts: 6
Joined: Sun Oct 17, 2021 8:30 pm

Issues with rewired ui submit button

Post by Omniclause »

First off just wanna say I’m absolutely loving this asset. Awesome job on it and awesome support. I’m having an issue with my game losing my ui submit button randomly. I am using rewired for my input. I have a map for keyboard and one for game pad. The game pad is working flawlessly every time. But the keyboard input works about half the time. I am using the enter key to advance text. It works sometimes and sometimes not. It appears to be randomly and if there is a pattern I haven’t recognized it. Sometimes when advancing through text the enter key just stops working. Sometimes in the middle of a conversation and sometimes at the very beginning. If I grab the game pad and hit the action button it works and will advance the text. This also helps the game “find” the keyboard ui submit button and it will start working again. I’m really struggling to debug this because I don’t understand how the issue can be keyboard only. It hasn’t once happened with the game pad. I am using multiple canvases if that has anything to do with it.
Omniclause
Posts: 6
Joined: Sun Oct 17, 2021 8:30 pm

Re: Issues with rewired ui submit button

Post by Omniclause »

I've also noticed that when this happens it for some reason allows escape to to submit for some reason?
User avatar
Tony Li
Posts: 21684
Joined: Thu Jul 18, 2013 1:27 pm

Re: Issues with rewired ui submit button

Post by Tony Li »

Hi,

Thanks for using the Dialogue System!

By default, the Escape key is mapped to the Dialogue Manager GameObject's Display Settings > Input Settings > Cancel Subtitle Input and Cancel Conversation Input. The Cancel Subtitle Input cancels the current subtitle, which is similar in effect to clicking the subtitle panel's continue button, but under the hood it's a cancel instead of a continue. If you don't want Escape to cancel, you can set the Input Settings > Cancel ... Inputs to None instead.

If you're using keyboard, it's likely that you may be moving, or even just nudging, the mouse. The Dialogue Manager's Input Device Manager component monitors mouse movement by default. (You can turn this off by unticking Detect Cursor Control.) When the mouse moves, it changes its Input Device mode to Mouse. When the Input Device mode is Mouse, it will not enforce that a UI button stays focused (selected). When in Joystick mode, it will enforce button focus. When a button is focused, the EventSystem's Submit input (e.g., joystick button 0 or Space/Enter keys) will click it. If you want to always enforce focus even in Mouse mode, tick the Input Device Manager's Always Auto Focus checkbox.
Omniclause
Posts: 6
Joined: Sun Oct 17, 2021 8:30 pm

Re: Issues with rewired ui submit button

Post by Omniclause »

Thank you so much this worked and was the issue! Totally explains the randomness. You saved my game jam game. I foolishly set up the keyboard controls at the very beginning of my project and checked them once and they worked and then did all my play testing with the game pad.
User avatar
Tony Li
Posts: 21684
Joined: Thu Jul 18, 2013 1:27 pm

Re: Issues with rewired ui submit button

Post by Tony Li »

Glad to help!
Post Reply