New Input System - "KeyNotFoundException"

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Maraakis
Posts: 4
Joined: Thu Apr 08, 2021 6:45 am

New Input System - "KeyNotFoundException"

Post 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 :)
User avatar
Tony Li
Posts: 21984
Joined: Thu Jul 18, 2013 1:27 pm

Re: New Input System - "KeyNotFoundException"

Post 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.
Maraakis
Posts: 4
Joined: Thu Apr 08, 2021 6:45 am

Re: New Input System - "KeyNotFoundException"

Post 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 :)
User avatar
Tony Li
Posts: 21984
Joined: Thu Jul 18, 2013 1:27 pm

Re: New Input System - "KeyNotFoundException"

Post 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.
Post Reply