[Solved] Two small input issues (Rewired integration, + general Unity UI issue)

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
Lollie
Posts: 11
Joined: Tue May 12, 2020 7:47 am

[Solved] Two small input issues (Rewired integration, + general Unity UI issue)

Post by Lollie »

Hi Tony,
I have a couple small issues related to input, hoping you can point me in the right direction.

1) Rewired: Axis input from D-Pad is ignored
When selecting response options, I'm able to switch between options with my left stick, but not the D-Pad.

I have two actions in Rewired, "UI Horizontal" and "UI Vertical", each with respective names for positive and negative values (UI Up/Down & UI Right/Left). Joystick Maps have been configured to handle both Left Stick and D-Pad. The Dialogue Manager game object has the "Input Device Manager" and "Input Device Manager Rewired" scripts.

Am I missing anything here?

2) Last-selected response button remains selected when switching between Keyboard/Joystick and Mouse input
20200516_22-34-36-920.gif
20200516_22-34-36-920.gif (36.31 KiB) Viewed 4149 times
So, my issue here comes from the fact that there's a distinction between "highlight" and "select" button states, and I'm using the same sprite for both states. But ideally, I'd like for the selected button to become deselected when the mouse hovers over a different button - and then, be able to reselect the first button when the mouse goes away. I don't know how to make the event system handle this.
Last edited by Lollie on Sat May 23, 2020 1:20 am, edited 1 time in total.
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: Two small input issues

Post by Tony Li »

Hi,
Lollie wrote: Sat May 16, 2020 8:59 am1) Rewired: Axis input from D-Pad is ignored
Does any other Unity UI navigation work with the d-pad (e.g., not Dialogue System-related)? The response menu's navigation just uses regular Unity UI navigation.
Lollie wrote: Sat May 16, 2020 8:59 am2) Last-selected response button remains selected when switching between Keyboard/Joystick and Mouse input
Add the UIHighlightFix script from this post to your button(s).
User avatar
Lollie
Posts: 11
Joined: Tue May 12, 2020 7:47 am

Re: Two small input issues

Post by Lollie »

Tony Li wrote: Sat May 16, 2020 9:41 amDoes any other Unity UI navigation work with the d-pad (e.g., not Dialogue System-related)? The response menu's navigation just uses regular Unity UI navigation.
Admittedly there is no other UI with navigation at this time, I've just been focusing on getting Dialogue System up and running in a separate project.
Tony Li wrote: Sat May 16, 2020 9:41 amAdd the UIHighlightFix script from this post to your button(s).
This is great, thank you!
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: Two small input issues

Post by Tony Li »

Regarding the d-pad, is it set up as an axis in Rewired or as buttons?

If you inspect the Rewired input manager at runtime, it shows the values of its buttons and axes. Watch the value of "UI Vertical" as you use the left stick. Then watch the value as you use the d-pad. Make sure they both contribute to the axis.
User avatar
Lollie
Posts: 11
Joined: Tue May 12, 2020 7:47 am

Re: Two small input issues

Post by Lollie »

D-Pad is correctly set up as an axis!

So after some digging around, I found I had a game object with a Standalone Input Module in the scene, so the UI was simply taking raw inputs though Unity's own input manager. I wasn't intending on using anything other than Rewired for inputs, but this seems to be the only way that the UI can currently function.

If the Standalone Input Module is removed, I've found that the UI doesn't listen to any input at all — *except* that if you write Rewired actions into Dialogue System Controller's "Cancel Subtitle Input" and "Cancel Conversation Input" fields, they work correctly.

These two fields appear to be the only elements that are listening to Rewired's actions. In Rewired, I can map any key or button to be the "Cancel" or "Interact" action, and Dialogue System will correctly react to them. Typing different Rewired actions into the "Cancel Subtitle Input" or "Cancel Conversation Input" fields will cause DS to correctly react to the newly-set inputs.

-----

EDIT: Doh, this led me towards the issue. I needed to replace the "Standalone Input Module" with "Rewired Standalone Input Module". User error, sorry!
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: Two small input issues

Post by Tony Li »

Hi,

What version of the Dialogue System are you using?

Would it be possible for you to back up your project and import the latest version?

Edit: Just saw your edit. :-) Sounds like you got it working.
User avatar
Lollie
Posts: 11
Joined: Tue May 12, 2020 7:47 am

Re: Two small input issues

Post by Lollie »

Yep, got it working! I figured the post should be left intact, in case anyone else runs into the same issue. Still, thanks for your time and help!
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: Two small input issues

Post by Tony Li »

Happy to help!
Post Reply