Hello, I’m developing a 3D game in Unity version 2022.3.24 targeting the Android platform. I’m encountering an issue with high CPU usage from the Input System and Event System when using an On-Screen Stick to emulate joystick input.
Here are the details:
I’m using only the New Input System Package .
The only supported devices in the Input System settings are “Touchscreen” and “AndroidJoystick.”
The problem arises when the player interacts with the on-screen joystick; it significantly increases the CPU usage.
In the profiler, Input Update shows that it is consuming a large percentage of resources, and the Event System also shows a noticeable increase in resource consumption. You can see this in the profiler screenshots.
In my script, I use InputAction.CallbackContext.ReadValue<Vector2>()
only when the player moves the joystick.
This problem seems to only occur during input interactions (when pressing on the on-screen stick). During idle times, the CPU usage drops significantly.
I’m not sure what is causing this, and I would appreciate any advice on how to optimize the Input System and reduce its CPU footprint in this scenario.
Thank you!