Page 1 of 1

New Input System Controller scrolling and setup

Posted: Wed Jul 19, 2023 8:20 pm
by Konst
How to have my Xbox controller and keyboard or scrolwheel of the mouse scroll trough multiple answers onscreen in an dialogue?

So we have let's say 4 optional branches we can choose.

I don't want an mouse pointer in the game. So I have set always Auto focus, but now there is no interaction with any buttons.

I use the new input system, but adding new buttons to the Register script, and adding manu inputs to all the Dialogue manager and selecter script seems to do nothing either. I have cancel dialogue and start dialogue working for both Xbox controller and keyboard, the next step is how to scroll trough the UI while still free in FPS to move around.

Or to experiment, what is an good place to start using some basic scripts to interact with the behaviour? I want to experiment. Most important is to localize with L2Localization and make sure to setup an efficient system to build upon further.


Thanks for some possible tips!

Re: New Input System Controller scrolling and setup

Posted: Wed Jul 19, 2023 9:35 pm
by Tony Li
Hi,
Konst wrote: Wed Jul 19, 2023 8:20 pmHow to have my Xbox controller and keyboard or scrolwheel of the mouse scroll trough multiple answers onscreen in an dialogue?
The Dialogue System's dialogue UIs use Unity UI. This means as long as you configure your Unity UI EventSystem (see Unity UI), the dialogue UI will work correctly with it. If you want to move the button selection up and down using the mouse scroll wheel, configure the EventSystem's Vertical input to use the mouse scroll wheel.

You'll also want to prevent the Dialogue System from showing the mouse cursor. To do this, on the Dialogue Manager GameObject's Input Device Manager component, set Input Device to Joystick, and UNtick Detect Cursor Control.
Konst wrote: Wed Jul 19, 2023 8:20 pmOr to experiment, what is an good place to start using some basic scripts to interact with the behaviour? I want to experiment. Most important is to localize with L2Localization and make sure to setup an efficient system to build upon further.
Please see Localization and i2 Localization Integration.

Re: New Input System Controller scrolling and setup

Posted: Thu Jul 20, 2023 8:01 am
by Konst
I now have an script on the Scrolling Dialogue UI that will use an specific new input map with Navigating trough the choices. Still not working perfectly, but getting there.

Re: New Input System Controller scrolling and setup

Posted: Thu Jul 20, 2023 8:35 am
by Tony Li
While you can use a custom script if you want, it's probably easiest to configure the EventSystem to work with Unity UI in general the way you want. Dialogue UIs use regular Unity UI navigation, nothing special.