ai-behavior-trees-util…
Engine-neutral behavior tree and utility AI code for NPCs in any language: Blackboard, reactive composites, decorators and…
Wires Unity 6.3 LTS player input with the Input System package: .inputactions assets, action maps, PlayerInput and control schemes. Use when input does nothing or fires under a menu, FindAction returns null, the old Input class throws, or Input.GetAxis code needs porting. Not
Claude Code
$ npx -y skills add gamedev-skills/awesome-gamedev-agent-skills --skill unity-input-system --agent claude-code
Codex
$ npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill unity-input-system -a codex -y
Cursor
$ npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill unity-input-system -a cursor -y
Gemini CLI
$ npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill unity-input-system -a gemini-cli -y
GitHub Copilot
$ npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill unity-input-system -a github-copilot -y
OpenCode
$ npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill unity-input-system -a opencode -y
Windsurf
$ npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill unity-input-system -a windsurf -y
name: unity-input-system description: > Wires Unity 6.3 LTS player input with the Input System package: .inputactions assets, action maps, PlayerInput and control schemes. Use when input does nothing or fires under a menu, FindAction returns null, the old Input class throws, or Input.GetAxis code needs porting. Not for engine-neutral buffering, remapping or deadzones (`input-systems`) or jump feel (`platformer`).
Read input through the Input System package (`com.unity.inputsystem`; Unity 6.3 LTS projects use 1.20.x), which replaces the legacy `Input.GetAxis`/`Input.GetKey` Input Manager. Targets Unity 6.3 LTS (6000.3).
component; reading a `Vector2` from a stick or WASD; one set of actions for gamepad, keyboard and touch; the Unity rebinding API.
`*.inputactions` asset.
**When not to use:** input architecture across engines (buffering, remapping screens, dead-zone design) → `input-systems`; moving the character once you have the vector → `unity-physics` / `unity-csharp-scripting`.
1. **Read Active Input Handling from the file.** `ProjectSettings/ProjectSettings.asset` has `activeInputHandler: 0` (old Input Manager only), `1` (Input System only) or `2` (both). The package receives nothing at `0`, and any leftover `Input.GetAxis` call throws at `1`. Grep `Assets/` for `Input.Get` before choosing `1`; changing the value restarts the Editor, so tell the user. 2. **Reuse the project-wide actions.** New Unity 6 projects usually ship `Assets/InputSystem_Actions.inputactions`, assigned as project-wide actions, with a `Player` map (`Move`, `Look`, `Attack`, `Interact`, `Crouch`, `Jump`, `Previous`, `Next`, `Sprint`) and a `UI` map. Add to it rather than creating a second asset. 3. **Edit the asset as JSON when the Editor is closed.** An `.inputactions` file is JSON: `maps[].actions[]` (`name`, `type`, `expectedControlType`) and `maps[].bindings[]` (`path` such as `<Keyboard>/space`, `action`, `groups` for control schemes, `isComposite` and `isPartOfComposite` for WASD). Give each new action and binding a fresh `id` GUID like the existing entries, keep the file valid JSON, and re-read it after writing. 4. **Choose one way to read it:**
asset reference to wire and the actions start enabled. The default for new code.
(`PlayerInputManager` gives each joining device its own player).
actions; you `Enable()` and `Disable()` them yourself. 5. **Switch action maps for context** (gameplay vs menu) instead of guarding every handler. 6. **Verify** with the checks below.
using UnityEngine;
using UnityEngine.InputSystem;
public class PlayerControls : MonoBehaviour
{
private InputAction _move, _jump;
private void Awake()
{
_move = InputSystem.actions.FindAction("Player/Move");
_jump = InputSystem.actions.FindAction("Player/Jump");
}
private void Update()
{
Vector2 move = _move.ReadValue<Vector2>(); // continuous value
if (_jump.WasPressedThisFrame()) { /* jump */ } // edge, true for one frame
}
}private InputActionMap _player, _ui;
private void Awake()
{
_player = InputSystem.actions.FindActionMap("Player");
_ui = InputSystem.actions.FindActionMap("UI");
}
private void Start() => _ui.Disable(); // project-wide actions enable every map at startup
private void OnEnable() => _player.FindAction("Attack").performed += OnAttack;
private void OnDisable() => _player.FindAction("Attack").performed -= OnAttack;
private void OnAttack(InputAction.CallbackContext ctx) { /* attack once per press */ }
public void OpenMenu() { _player.Disable(); _ui.Enable(); }
public void CloseMenu() { _ui.Disable(); _player.Enable(); }`PlayerInput` with Behavior = Send Messages calls `On<ActionName>(InputValue)` on scripts on the same GameObject: `void OnMove(InputValue v) => _move = v.Get<Vector2>();`, `void OnJump(InputValue v) { if (v.isPressed) Jump(); }`. Broadcast Messages also reaches children; Invoke Unity Events and Invoke C# Events need no naming convention.
to `FindAction`/`FindActionMap` exists (for `"Player/Jump"`, a map `Player` with an action `Jump`), and that composites have all their parts. Confirm `activeInputHandler` matches the code.
code. List `com.unity.inputsystem` under `"testables"` in `Packages/manifest.json` and add `Unity.InputSystem` and `Unity.InputSystem.TestFramework` to the test `.asmdef` (assembly setup is in `unity-csharp-scripting`):
using NUnit.Framework;
using UnityEngine.InputSystem;
public class JumpInputTests : InputTestFixture
{
[Test]
public void SpaceTriggersJump()
{
var keyboard = InputSystem.AddDevice<Keyboard>();
var jump = new InputAction("Jump", InputActionType.Button, "<Keyboard>/space");
int performed = 0;
jump.performed += _ => performed++;
jump.Enable();
Press(keyboard.spaceKey);
Assert.That(performed, Is.EqualTo(1));
}
}press (for example `Space`) through the Input System into
<img src="docs/assets/awesome-gamedev-agent-skills-banner.png" width="820" alt="awesome-gamedev-agent-skills — game-dev skills for AI coding agents.
Engine-neutral behavior tree and utility AI code for NPCs in any language: Blackboard, reactive composites, decorators and…
Engine-neutral game audio technique: bus layout, volume sliders in decibels, loudness, ducking music under dialogue, adaptive…
Builds and tunes game cameras, engine-neutral with Godot and Cinemachine 3 mappings: 2D follow with deadzone and look-ahead,…
Plans, generates or sources, and validates consistent game art: style guides, sprites, pixel art, tilesets, icons and textures,…
Builds engine-neutral branching dialogue with Ink, Yarn Spinner or a small JSON graph runner: lines, choices, conditions,…
Designs engine-neutral enemy and NPC AI: picks FSM, behavior tree, utility or GOAP, and builds perception, steering and A*…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.