← ClaudeAtlas

unity-game-ailisted

Enemy AI in 2D and 3D: sight, hearing, patrol and chase, state machines, behaviour trees, waves.
tipoLi5890/unity-dev-skills · ★ 2 · AI & Automation · score 75
Install: claude install-skill tipoLi5890/unity-dev-skills
# unity-game-ai — perception on a budget, decisions on a tick, movement by whoever owns the transform > **An enemy that re-plans every frame and moves itself is slow, and it jitters.** Slow, because > twenty sentries casting a ray and re-issuing a path sixty times a second do twelve hundred of > each for decisions that change twice a second. Jittery, because a brain that writes > `transform.position` is a second writer beside the agent, the motor or the cell map that > already owns it. Neither is fixed by a cleverer brain. Both are fixed by three layers on three > clocks. ## Symptom → where to look | The report | Go to | |---|---| | "the enemy sees me through walls", sees behind itself | `reference/perception.md` | | "the guard never gives up", the leash, losing the target | `reference/patrol-and-chase.md` | | "it flickers between two states" | `reference/state-machine.md` (hysteresis) | | "every enemy raycasts every frame" | `reference/perception.md` (the cast budget), *Discipline* | | "enemies spawn on top of me", waves | `reference/spawners-and-waves.md` | | "the AI picks a dumb move" on a board | `reference/tactics-ai.md` | | A first enemy from nothing | §0, then §1 | | Anything else | *Load what the situation needs* | ``` perceive ───────────► decide ─────────────► act ──────────────────► IMover 10 Hz, cast budget 10 Hz, same tick every simulation step owns the transform Perception.cs StateMachine.cs the current state NavMeshAgent · 2D