1. Mouse input
The relevant methods and variables are as follows:
In Unity, the mouse position is represented by the pixel coordinates of the screen, the lower left corner of the screen is (0,0), and the upper right corner is (Screen.width, Screen.height).
2. Keyboard operation
The relevant methods are as follows:
The key names and KeyCode codes of commonly used keys are as follows:
3. Mobile device input
For methods and variables:
The touch data of the mobile device can be accessed through GetTouch or touches. The data is stored in the Touch structure. The variables are as follows:
The status of the phase is as follows: