how does unity input works for pc and android

actually i want to know that how unity reads input for PC games like (MouseButtonDown) and android touches . I am not talking about methods to use them , i am asking how they work . Can anyone explain it please. Reason is a issue in my game which i am unable to explain to explain .

its referenced under Edit->BuildSetting->Input

Each axis has a main input and an alternative pre done for you. to access them directly through code you access them via a string pasthrough. aka Input.GetKey(“Vertical”){} or Input.GetKey(“Horizontal”){}
Works similar to how SceneManager handles build index with strings. if the list of scenes has a scene with the name called it returns that scene by name for example. similar method applies here. because Vertical and Horizontal Exist within the Axis’ list we can call it by string in an Input.GetKey() GetKeyDown() or GetKeyUp();

i can’t tell you exactly how it works, but there are several methods for several situations to keep in mind!

just fyi:

  • Input.something method => used at runtime no UI
  • event.current method => used for editor
  • ipointer method => used for UI elements

i believe there are more methods to add to this list those are just the common one i use in my projects