Page 1 of 1

Selecting Response with a Custom Key?

Posted: Thu Oct 13, 2022 8:09 pm
by DrewThomasArt
The "C" key is the interact button for my entire game, so I'd like to be able to select responses with it, and I can't find out how. It seems to work with "enter" as the default, but I'd like to switch or add "C" to that. I'm using the Runic Dialogue UI if that helps.

Any help is greatly appreciated!

Re: Selecting Response with a Custom Key?

Posted: Thu Oct 13, 2022 9:51 pm
by Tony Li
Hi,

The dialogue UIs use standard Unity UI input, which is controlled by the EventSystem GameObject's input module.

If you're using Unity's built-in input manager, the EventSystem's input module is called StandaloneInputModule. This component has a field named "Submit Button" that is set to "Submit". "Submit" is an input defined in the input manager. When the player presses this input, it "clicks" the currently-focused UI button.

To add the C key to the "Submit" input, select menu item Edit > Project Settings. On the left hand side, click Input Manager. On the right hand side, expand Axes, and locate the entries for Submit. You can either replace one of the Positive Button or Alt Positive Button values (e.g., change "space" to "c") or add a new Submit entry just for "c".

Re: Selecting Response with a Custom Key?

Posted: Fri Oct 14, 2022 7:19 pm
by DrewThomasArt
Tony Li wrote: Thu Oct 13, 2022 9:51 pm Hi,

The dialogue UIs use standard Unity UI input, which is controlled by the EventSystem GameObject's input module.

If you're using Unity's built-in input manager, the EventSystem's input module is called StandaloneInputModule. This component has a field named "Submit Button" that is set to "Submit". "Submit" is an input defined in the input manager. When the player presses this input, it "clicks" the currently-focused UI button.

To add the C key to the "Submit" input, select menu item Edit > Project Settings. On the left hand side, click Input Manager. On the right hand side, expand Axes, and locate the entries for Submit. You can either replace one of the Positive Button or Alt Positive Button values (e.g., change "space" to "c") or add a new Submit entry just for "c".
Thank you!

Re: Selecting Response with a Custom Key?

Posted: Fri Oct 14, 2022 7:56 pm
by Tony Li
Happy to help!