Page 1 of 1

New Input System - "KeyNotFoundException"

Posted: Wed Sep 29, 2021 5:07 pm
by Maraakis
Hi!
I've been working again with your Dialogue System, after changing from the old to the new Input System for my game. It works for the most part (I can only interact with [Spacebar], not with [right mouse button] or [E.key] as I had configured in my Input System), but I get a message thrown in the Console and I'm not sure how to fix it. I had a look at your recent Video about how to make Dialogue System and New Input System work together, but it didn't adress this problem. Please have a look:

Image

I'm trying to use mouse or keyboard controls and I added the "RegisterMyControls" script mentioned in your video, but that didn't change anything I am aware of.

In another Topic, somebody had the same error message, but his mouse/keyboard worked fine - it just happened with joystick controls. I changed my Input Device Manager Fields in regard to the solution he was given, but again, it had no (visible) effect:

Image

Help would be appreciated :)

Re: New Input System - "KeyNotFoundException"

Posted: Wed Sep 29, 2021 9:24 pm
by Tony Li
Hi,

Somewhere you've set a Key Code dropdown to Mouse 1. Set the dropdown to None, and instead set the Button name to the name of your InputActions action.

Re: New Input System - "KeyNotFoundException"

Posted: Thu Sep 30, 2021 5:45 am
by Maraakis
Aaah, thank you very much. The error was in one of the "Selector"-Script's Button Downs and again on the "Continue"-Element of the Dialog UI. Now it works just fine, thank you for the hint :)

Re: New Input System - "KeyNotFoundException"

Posted: Thu Sep 30, 2021 8:05 am
by Tony Li
Glad to help! The next release (2.2.21) will suppress the error message if you've set a Key Code dropdown to "Mouse #", just like it currently does with "Joystick Button #" Key Codes. Key Codes that it can translate into new Input System inputs, such as regular keyboard keys, will continue to work fine.