Good night, all right?
I am new to Unity, despite having already completed some basic projects, and I am thinking about the best way to organize the code I use to commands, for example, when you press the key "i", open inventory, among others...
The way I'm doing it: I put almost all codes in a script within the CharacterController, but not sure if I'm doing the right way... For example, were various functions within the Update ():
//Close the application
And there are many commands as well, I've thought about putting this script into an empty gameObject so I can import into any scene. And one more question: So, each frame is scanned all if/else to find some valid to run, but does not use a lot of memory? Or is there another more correct way to use scripts for each keyboard command?