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
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.
[Solved] Two small input issues (Rewired integration, + general Unity UI issue)
[Solved] Two small input issues (Rewired integration, + general Unity UI issue)
Last edited by Lollie on Sat May 23, 2020 1:20 am, edited 1 time in total.
Re: Two small input issues
Hi,
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.
Add the UIHighlightFix script from this post to your button(s).
Re: Two small input issues
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.
This is great, thank you!
Re: Two small input issues
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.
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.
Re: Two small input issues
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!
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!
Re: Two small input issues
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.
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.
Re: Two small input issues
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!