← ClaudeAtlas

unity-inputlisted

Input System controls: gamepad, touch joystick, mouse aim, rebinding; a jump missed or doubled.
tipoLi5890/unity-dev-skills · ★ 2 · AI & Automation · score 75
Install: claude install-skill tipoLi5890/unity-dev-skills
# unity-input — gameplay reads one struct, never a device > **A press happens on the render clock; gameplay runs on the physics clock.** The Input System > updates once per rendered frame, so `WasPressedThisFrame()` polled in `FixedUpdate` is true for > zero fixed steps on a fast frame and for several on a slow one. The same line of code loses the > jump on a 144 Hz monitor and double-fires it on a phone that dropped to 20 fps. ## Symptom → where to look | The report | Go to | |---|---| | "the jump doesn't always register", "it jumps twice" | §1, `reference/reading-input.md` | | "Input.GetKey throws", Active Input Handling | §0, `reference/legacy-migration.md` | | "add gamepad support", schemes, the actions asset | §1, `reference/action-asset.md` | | "add a virtual joystick", touch and swipes | `reference/touch-and-on-screen.md` | | "aim at the mouse", click-to-move | `reference/pointer-and-aim.md` | | "let players rebind keys", button prompts | `reference/rebinding-and-devices.md` | | Grid steps with key repeat; a press graded in milliseconds | §2 | | A scripted source for journey tests | §1 step 5, `templates/InputJourneyTest.cs` | The cure is structural, not a setting: one component reads the device in `Update`, **latches** each press with its time, and gameplay **spends** that press from `FixedUpdate` exactly once. Everything else in this skill hangs off that one funnel. ``` device ──► .inputactions ──► RunInputReader ──► RunInput ──► RunController (bindin