1. Concept introduction:
New input system: Input System
Old input system: Input Manager
Reference links:
Mobile Device Input - Unity Manual
New version of Unity InputSystem system usage tutorial - Zhihu
Unity knowledge record--Input System (6)--About the problem of various UI response failures-Bilibili
2. Problem description:
Case 1: The Android phone UI button responds when clicked, but the perspective cannot be rotated when the finger clicks on the screen or the finger slides.
That is, the values of Input.touchcount cannot be obtained.
Cause analysis: Since this project needs to be published on pico devices, UNITY's new operating system Input System is used, resulting in the old API being unusable. So the script cannot get the screen touch information. But the new operating system, the UI is normal
Solution: Use an older operating system
Situation 2: After changing the operating system, the Android phone UI button has no response when clicked, but the viewing angle can be rotated by sliding the finger.
Cause analysis: The UI system is still using the new APi.input, resulting in the old operating system not being able to obtain the click operation of the UI button.
Solution: Use the old input UI, standalone InoutModule.
The UI's own manager and EventSystem components are using the new inputSysteamUIInoutModule and need to be replaced by the corresponding old inputManager----standalone InoutModule.
3. Summary:
New input system: Input System corresponds to inputSysteamUIInoutModule
Old input system: Input Manager corresponds to standalone InoutModule
4. Reflection:
It may be the new input system: the API used by the Input System is not Input.touchcount, but other APIs or Using classes, resulting in the inability to touch and move under the new input system.
5, follow-up
Struct Touch | Input System | 1.3.0
New input system: The API used by Input System is indeed not Input.touchcount, but using Touch = UnityEngine.InputSystem.EnhancedTouch.Touch;