Troglodyte In Underbelly: Unity Key Bind Problem

 Unknown Key bind issue in unity input controller

    The documentation of game engines is an assets that always provides great value. However, sometimes you run into issues that cannot be explained and that the documentation did not predict. One issue of a nature that was extremely frustrating was linking key binds in the newer unity input system. The system is on the newer side, but works in a straight forwards fashion.



    The issue that we ran into to was the system not linking to the script we had written. To link inputs to the input master, you would create your key bind in the input master, and then create a function names after the keybind. If you created a key bind called Sprint, the auto linking function would have to be named OnSprint(). However, even with everything named correctly, some of the functions were not linking. After some testing, we came to the conclusion that having the word Key in the input master actions name would cause the functions to not link to the action. This was a problem that we could not find any documentation on and as such could not get an explanation as to why this was a problem. Luckily the easy solution was to not use the word key in the action names, but coming to this conclusion was a major headache, as the problem was not foreseeable in any way.

Comments

Popular posts from this blog

Troglodyte In Underbelly: Git Issues