Handling input in one script or multiple?

So I currently have 2 scripts that require input my movement and camera and I wanted to make a new thing that also requires input and it got me thinking if I should continue having my input scattered around or if I should move all of it into one script and then use events like this?

void Update()
    if (Input.GetKeyDown(KeyCode.Mouse0))

    if (Input.GetKeyDown(KeyCode.E))

    if (Input.GetKeyDown(KeyCode.Q))

Would either method be fine or is one better? Or is there a better way that I don’t know about?

Hi, I think scattering your inputs won’t be a problem.

However, I’m not sure that invoking events is the best way ; I would rather target the required scripts and call their methods, like this :

if (Input.GetKeyDown(Keycode.LeftArrow)) 
if (Input.GetKeyDown(Keycode.Space)) 
if (Input.GetKeyDown(Keycode.Escape)) 

Generally I prefer to have them all in one script (usually my GameManager), but sometimes not : I’m currently making a game where my camera inputs are in my CamController script, for better readability.

Just be sure to not have the same inputs in different scripts, of course :wink: