More Controls Remapping


Controls remapping has definitely been one of the most problematic aspect of working on the game. Not only because this is my first experience with Unity's new input system, but controls remapping is a pretty involved process. I needed to make sure that controls can be rebinded, they are persistent between play sessions, and can be reset to default controls. I had the function to properly remap player controls correct for about a day or two, but I still couldn't get it to work until another person on the team brought up the fact that I wasn't actually remapping to our input system. An annoyingly simple oversight, but I learned that I need a specific reference to our input system rather than just a general call to the input system. I then moved onto persistent key bindings, which actually wasn't too bad, but did cause me some problems. I essentially needed to write the current keybinds to a Json override and save a matching PlayerPref in order to properly write the keys. Then to load them, I needed to I simply needed to load the PlayerPref and if it wasn't empty, just load the keybinds from the saved Json file. Laslty, I needed to make sure that the text matched when switching scenes or when loading the game up. Another person on the team helped me with that by writing a static script that would read in the Json file and then map the bindings to our input system. It was a very difficult process due to never having worked on it before and trying to fix all the issues that came up, as there was a lot.

Leave a comment

Log in with itch.io to leave a comment.