Page 1 of 1

New input system - changing action map

Posted: Sat Jul 25, 2020 8:19 pm
by fyperia
Hi,

I am probably missing something very obvious, but how would I go about changing the action map to a Dialogue map every time a conversation starts, and back to the regular input when it ends?

Re: New input system - changing action map

Posted: Sat Jul 25, 2020 9:03 pm
by Tony Li
Hi,

I'll assume you've already written a script that instantiates your controls, and you've added it to the Dialogue Manager, as covered in the Input Device Manager PDF.

The Dialogue System offers a number of special methods. Add OnConversationStart and OnConversationEnd methods to the script. In OnConversationStart, change to the Dialogue map. In OnConversationEnd, change back to the regular map.

(The non-scripting alternative to those script methods is the Dialogue System Events component. But since you already have a script for the new input system, you might as well just add those two methods.)

Re: New input system - changing action map

Posted: Sun Jul 26, 2020 11:41 am
by fyperia
That's exactly what I was missing, thank you so much!

Re: New input system - changing action map

Posted: Sun Jul 26, 2020 12:12 pm
by Tony Li
Glad to help!

Re: New input system - changing action map

Posted: Sun Jul 26, 2020 3:10 pm
by fyperia
Is this the correct class to be looking at to set up controller input? I'm having trouble getting the system to recognize anything other than the escape key.

Re: New input system - changing action map

Posted: Sun Jul 26, 2020 5:19 pm
by Tony Li
Hi,

No; anything that says "UnityGUI" is for the really old legacy UnityGUI system (aka OnGUI or IMGUI).

If you've defined a "Cancel Subtitle" input in your action map, inspect the Dialogue Manager GameObject. Set Display Settings > Input Settings > Cancel Subtitle Input > Button to "Cancel Subtitle".

If that isn't what you're looking for, please let me know what operation you're trying to recognize.

Re: New input system - changing action map

Posted: Sun Jul 26, 2020 6:26 pm
by fyperia
I'm trying to set up the gamepad so I can use the joystick to move up and down the menu options, and press A to select an option or advance the conversation.

The setting you just described seems to only work for me when I have a key selected from the dropdown.

Re: New input system - changing action map

Posted: Sun Jul 26, 2020 8:49 pm
by Tony Li
Hi,

To navigate the response menu and select response buttons, you shouldn't need to do anything in the Dialogue Manager's Input Settings.

Instead, tick the Dialogue Manager's Input Device Manager component > Always Auto Focus checkbox.

Make sure your scene has an Event System that's set up to allow standard Unity UI navigation.

Re: New input system - changing action map

Posted: Mon Jul 27, 2020 12:01 am
by fyperia
Apparently one of my other scripts was interfering with the input; did everything you said and turned off that script and now it works just fine. Thanks!

Re: New input system - changing action map

Posted: Mon Jul 27, 2020 8:40 am
by Tony Li
Great! Happy to help.