SkillAgentSearch skills...

scenario-unity-gameplay

Use when building or debugging Unity gameplay systems: enemy AI that patrols, chases and attacks, NavMesh baking and agents (AI Navigation 2), feet sliding on agents, state machines or behavior trees, physics projectiles that tunnel, the physics spiral, layers and the collision matrix, CharacterCont…

Install / Use

npx skills add scenario-labs/skills --skill scenario-unity-gameplay

Installs into whichever agent you are using.

About this skill
📄

SKILL.md

Installable skill definition

Quality Score

86/100

Category

Other

Supported Platforms

Universal

Tags

Our assessment of scenario-unity-gameplay

scenario-unity-gameplay scores 86/100 on our quality scale, 205th of 354 Other skills we index.

Its SKILL.md is 19 KB long, well organised into 10 sections and no code examples: a thorough specification that gives an agent plenty to work with.

With 1,048 GitHub stars, it is one of the more widely adopted skills in the catalogue.

Substance
30/30
Structure
13/20
Description
15/15
Adoption
13/20
Freshness
15/15

Maintenance, license and trust

  • The repository was last updated 35 days ago, so scenario-unity-gameplay is actively maintained.
  • It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
  • Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.

Safety scan

No issues found

Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands.

Automated pattern scan on 2026-11-20. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.

scenario-unity-gameplay compared with similar skills

All 4 of these similar skills score higher than scenario-unity-gameplay; compare them before choosing.

SkillScoreStarsUpdatedFormat
scenario-unity-gameplay (this skill)by scenario-labs861.0k35d agoSKILL.md
algorithmic-artby anthropics100177.9k2mo agoSKILL.md
pptxby anthropics100177.9k2mo agoSKILL.md
prospectingby coreyhaines3110060.1k11d agoSKILL.md
ad-creativeby coreyhaines3110060.1k11d agoSKILL.md

Frequently asked questions

How do I install scenario-unity-gameplay?
Run npx skills add scenario-labs/skills --skill scenario-unity-gameplay. The install tabs above show the steps for each supported agent.
Which AI agents does scenario-unity-gameplay work with?
It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
Is scenario-unity-gameplay safe to use?
Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
Is scenario-unity-gameplay still maintained?
The repository was last updated 35 days ago, so scenario-unity-gameplay is actively maintained.

name: scenario-unity-gameplay description: "Use when building or debugging Unity gameplay systems: enemy AI that patrols, chases and attacks, NavMesh baking and agents (AI Navigation 2), feet sliding on agents, state machines or behavior trees, physics projectiles that tunnel, the physics spiral, layers and the collision matrix, CharacterController vs Rigidbody characters, object pooling, 'hundreds of enemies', DOTS, Burst or Jobs decisions, Netcode for GameObjects multiplayer, audio mixers, snapshots, volume sliders and 3D combat sounds." license: MIT

Unity gameplay systems (gameplay systems programmer)

Expert gameplay work in Unity 6.3 means every system has one owner of its state, runs at a rate someone chose, and is proven by a measurement: steps per frame, a tunneling test at the real speed, a path query through the real door, a timed transition, the worst frame at the real agent count. This skill carries the expert delta from the 6.3 manuals, AI Navigation 2, NGO and shipped games (Survival Kids, Very Very Valet), with jobs and tests run in 6000.3.21f1. If a sibling skill named here is missing from your available skills, load it with skill_get (Scenario MCP) or ask the user to install it (https://github.com/scenario-labs/skills#install); unattended, proceed from tool schemas and flag the gap.

REQUIRED BACKGROUND: scenario-unity-expert (channels, review loop, 6.3 traps). Install: ut_gameplay.install(P) (core AgentKit + AgentKit.Gameplay jobs + the AgentKit.Gameplay.Runtime assembly).

Stance (the expert delta)

  1. Fix frequency before colliders. Physics cost multiplies with fixed steps per frame; "a call count close to 10 might indicate an issue" (6.3 Manual). Measured at 50 Hz: a 400 ms frame ran 17 catch-up steps with the default 0.333 s Maximum Allowed Timestep; a 0.1 s cap gave 5 steps and a world at 0.25x. The cap trades the snowball for slow motion.
  2. Escalate CCD per object on observed tunneling, then leave rigid bodies. Discrete, Continuous Speculative ("often the best choice"), Continuous, Continuous Dynamic last (6.3 Manual). Measured: every CCD mode held a static 5 cm wall to 300 m/s; against a thin dynamic plate Continuous tunneled from 50 m/s, Continuous Dynamic from 100. A sweep of the projectile's own shape (SweepProjectile) stopped the 300 m/s shot, and a 0.25 m sphere sweep hit a post a center ray missed: match the cast to the collider (LlamAcademy, fJyi7l2tWKo [00:09:54]).
  3. One writer per piece of state. Agent plus non-kinematic Rigidbody is a race, agent plus enabled obstacle avoids itself, agent and animation must flow one way (AI Navigation manual). Measured: a main-thread write to a transform held by a running TransformAccessArray job waited the whole job (22 to 38 ms, vs 0.003 ms outside it) (Survival Kids, ZkvK0mX-id4 [00:26:42]).
  4. A NavMesh is proven by queries and saved as an asset. One NavMesh Surface per agent type (SMWxCpLvrcc [00:06:35]); voxel 3 per agent radius, 4 to 6 indoors (manual). Measured: a door 1.2x the agent diameter was closed at 3 voxels per radius, open at 6; stairs without a HeightMesh read 0.17 to 0.26 m off the treads, 0 with it; a carve reached queries one frame later.
  5. The lightest AI structure, ticked from one place. Unstructured for 1 to 2 behaviors, FSM while transitions stay few (toward N squared), behavior tree for priorities, GOAP for chained goals (LlamAcademy, CZvfuNfdc1M [00:07:13]). Brains tick from a director; mixed object types register with one UpdateHub sorted by type (Survival Kids: same code, mean -12%, worst frame 2.18 to 1.43 ms [00:23:59]; measured here at 1,000 and 10,000 objects: mean 7 to 14% lower).
  6. DOTS is an umbrella; measure before adopting it. Order updates, then Burst jobs over NativeArrays with transforms copied out in a tiny read-only job, then fill main-thread job waits with Burst .Run() (measured: 6 to 10 ms saved of 21 to 26), and only then Entities (Survival Kids [00:08:49], [00:39:15]). Decide ECS early, for large CPU-driven counts, competitive netcode or determinism (Turbo Makes Games, Bz24Jp30nkM [00:21:58]).
  7. NGO 2.x has no full client-side prediction and reconciliation (no rollback-and-replay loop) and no server rewind. Client anticipation (AnticipatedNetworkVariable, AnticipatedNetworkTransform, OnReanticipate) is the building block for hand-built prediction (NGO 2.7 manual; same text in the bundled 2.13.0 docs). Server authority by default, HasAuthority over IsServer, "would a late joiner need it?" decides NetworkVariable vs RPC.
  8. Every sound goes through a mixer group; distance happens at the source. Output None (the default) bypasses the mixer; attenuation and distance low-pass happen at the AudioSource before any group (manual). Measured: Logarithmic rolloff kept attenuating past Max Distance (1/d to 40 m), a slider on a snapshot parameter froze that group's moods until ClearFloat, and 60 uncapped looping weapon sounds erased a quiet music bed at default priority. Cap frequent sounds at 10 to 15 and steal the oldest (git-amend, BgpqoRFCNOs [00:17:56]).

Establish first

Ask once: genre and whether play is competitive; platforms and frame budget (default 16.67 ms desktop, mobile x 0.65, scenario-unity-mobile); peak agents, projectiles and sounds; whether the player pushes and is pushed by physics; animation-driven or agent-driven locomotion; multiplayer (players, host leaving, rollback or hit rewind); existing layers, mixer and scenes; 2D or 3D (scenario-unity-2d). Defaults: 3D URP, 50 Hz, layers Environment 8, Player 9, Enemy 10, Projectile 11 with Projectile x Projectile and Enemy x Enemy off, Humanoid agent type (radius 0.5), code FSM enemies at 10 Hz, one mixer Master > Music, SFX, UI.

Workflow

  1. Project physics. GameplaySetup.ConfigurePhysics (layers, Physics.IgnoreLayerCollision, Time and Physics through SerializedObject). GATE: ReadPhysicsSettings in a second process shows the matrix, 0.02 s and the cap (measured: Time.* setters plus SaveAssets did not persist).
  2. Navigation. GameplayScenes.BuildNavArena pattern: surface layerMask = Environment, voxel = radius/3, BuildNavMesh() then AssetDatabase.CreateAsset(surface.navMeshData, ...) as the Inspector Bake button does, save. Build Height Mesh when agents use stairs; NavMesh Modifier Remove Object on foliage; Collect Objects = Volume or Modifier-only to scope. GATE: CalculatePath PathComplete through every door, SamplePosition on spawns and treads, data present after reopening, scene still text; overlay capture opened.
  3. Characters and locomotion. CharacterController when physics interplay is not in the design (skin >= max(0.01, 10% radius)); FloatingCapsule when it is. Agent locomotion with AgentLocomotionSync: agent drives (root motion off, speed from deltaPosition) or animation drives (updatePosition = false, 0.9 pull beyond the radius). GATE: 0 cc.* audit errors; ControllerTests numbers; drift test.
  4. AI. EnemyBrain + EnemyDirector; perception cheapest first, then one ray on an occluder mask with QueryTriggerInteraction.Ignore, batched in LineOfSightBatch (RaycastCommand with QueryParameters) at scale; agent off before obstacle on death. GATE: EnemyLoopTests times Patrol > Chase > Attack > Search > Patrol > Dead.
  5. Projectiles, queries, pools. Rigid projectiles: CCD by a tunneling test at the real speed and thickness; fast or fat shots: SweepProjectile. NonAlloc through Queries (loop on the count, flag a full buffer, sort when order matters); Physics.SyncTransforms() before querying colliders moved by transform. ProjectilePool with collectionCheck. GATE: CcdLadderMeasured and QueryTests at your numbers; CountActive back to 0.
  6. Audio. Mixer from GameplayAudio.CreateCombatMixer or a template; every source routed; CombatAudio capped emitters; sliders on a parameter no snapshot drives; music priority 0; distance muffling with an AudioLowPassFilter curve. GATE: AudioTests, AudioSpatialTests (music band under spam), 0 audio.* errors; a human listening pass at caps 30, 15, 5 under stress, keeping the smallest that sounds full (BgpqoRFCNOs [00:17:23]).
  7. Scale. BuildCrowdScene at the real count, AgentProfile.PlayModeTimings, AIBudgetMeter, JobWaitMeter; PerceptionBenchmark, ProximityBenchmark, dots_gate and proximity_gate before any DOTS proposal. GATE: p95 AND the worst frame; editor numbers confirmed in a development player with Profile Analyzer and the native device profiler (Survival Kids [00:10:27]; scenario-unity-performance).
  8. Netcode scoping (multiplayer only). ut_gameplay.netcode_fit, authority and tick sheet, prediction proven in Edit Mode with NetSim before NGO wiring. GATE: reconciliation tests green; the design says what must be hand-built.

Numbers

| Value | Relative to | Source | | ------------------------------------------------------------------------------------------------------------- | -------------------------- | ------------------------------------------------------------------------------ | | 0.02 s (50 Hz); 1/60 for one step per 60 fps frame | Fixed Timestep | Manual; pTz3LMQpvfA [00:01:22] | | 0.333 s default (about 16 steps at 50 Hz); 0.1 s = 5 steps | Maximum Allowed Timestep | measured | | near 10 calls per frame = problem | Physics.Processing Calls | Manual | | Discrete tunnels above about (thickness + 2r + 0.02) / dt | 50 Hz | discrete_tunnel_speed; measured 20 m/s, 5 cm wall | | skin >= max(0.01, 0.1 x radius); step 0.1 to 0.4 m; min move 0 | 2 m CharacterController | Manual | | sag = m x g / k; x2 acceleration on reversals | floating capsule | measured; Toyful [00:05:32] | | 3 voxels per radius; 4-6 interiors; >8 rarely helps; door >= about 1.5x agent diameter | agent radius | manual; measured | | drift pull 0.9 x delta when drift > agent radius (measured max 0.41 to 0.45 m at r 0.4, 1.84 m without) | animation-driven agent | AI Navigation manual | | carve seen next frame; Carve Only Stationary re-carves after 0.5 s still (measured 0.50 to 0.61 s) | NavMesh Obstacle | manual; measured | | AI slice 0.10-0.15 ms (Update) vs about 0.01 ms (10 Hz director) | 200 agents, Editor | measured | | Burst parallel slower than managed at 200 agents, faster from 2,000 | perception prefilter | measured

Truncated for display — read the full file on GitHub.

Related Skills

View on GitHub
GitHub Stars1.0k
CategoryOther
Updated1mo ago
Forks129

Languages

Python

Trust signals

100/100

From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.

No cautions