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-gameplayInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
OtherSupported Platforms
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.
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 foundOur 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.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| scenario-unity-gameplay (this skill)by scenario-labs | 86 | 1.0k | 35d ago | SKILL.md |
| algorithmic-artby anthropics | 100 | 177.9k | 2mo ago | SKILL.md |
| pptxby anthropics | 100 | 177.9k | 2mo ago | SKILL.md |
| prospectingby coreyhaines31 | 100 | 60.1k | 11d ago | SKILL.md |
| ad-creativeby coreyhaines31 | 100 | 60.1k | 11d ago | SKILL.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.
Skill content
View source on GitHubname: 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)
- 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.
- 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]). - 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]).
- 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.
- 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
UpdateHubsorted 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). - 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]). - 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,HasAuthorityoverIsServer, "would a late joiner need it?" decides NetworkVariable vs RPC. - 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
- Project physics.
GameplaySetup.ConfigurePhysics(layers,Physics.IgnoreLayerCollision, Time and Physics throughSerializedObject). GATE:ReadPhysicsSettingsin a second process shows the matrix, 0.02 s and the cap (measured:Time.*setters plusSaveAssetsdid not persist). - Navigation.
GameplayScenes.BuildNavArenapattern: surfacelayerMask= Environment, voxel = radius/3,BuildNavMesh()thenAssetDatabase.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:CalculatePathPathComplete through every door,SamplePositionon spawns and treads, data present after reopening, scene still text; overlay capture opened. - Characters and locomotion. CharacterController when physics interplay is not in the design
(skin >= max(0.01, 10% radius));
FloatingCapsulewhen it is. Agent locomotion withAgentLocomotionSync: agent drives (root motion off, speed fromdeltaPosition) or animation drives (updatePosition = false, 0.9 pull beyond the radius). GATE: 0cc.*audit errors;ControllerTestsnumbers; drift test. - AI.
EnemyBrain+EnemyDirector; perception cheapest first, then one ray on an occluder mask withQueryTriggerInteraction.Ignore, batched inLineOfSightBatch(RaycastCommand with QueryParameters) at scale; agent off before obstacle on death. GATE:EnemyLoopTeststimes Patrol > Chase > Attack > Search > Patrol > Dead. - Projectiles, queries, pools. Rigid projectiles: CCD by a tunneling test at the real speed and
thickness; fast or fat shots:
SweepProjectile. NonAlloc throughQueries(loop on the count, flag a full buffer, sort when order matters);Physics.SyncTransforms()before querying colliders moved by transform.ProjectilePoolwith collectionCheck. GATE:CcdLadderMeasuredandQueryTestsat your numbers;CountActiveback to 0. - Audio. Mixer from
GameplayAudio.CreateCombatMixeror a template; every source routed;CombatAudiocapped emitters; sliders on a parameter no snapshot drives; music priority 0; distance muffling with anAudioLowPassFiltercurve. GATE:AudioTests,AudioSpatialTests(music band under spam), 0audio.*errors; a human listening pass at caps 30, 15, 5 under stress, keeping the smallest that sounds full (BgpqoRFCNOs [00:17:23]). - Scale.
BuildCrowdSceneat the real count,AgentProfile.PlayModeTimings,AIBudgetMeter,JobWaitMeter;PerceptionBenchmark,ProximityBenchmark,dots_gateandproximity_gatebefore 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). - Netcode scoping (multiplayer only).
ut_gameplay.netcode_fit, authority and tick sheet, prediction proven in Edit Mode withNetSimbefore 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
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
pptx
177.9kUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an em…
prospecting
60.1kWhen the user wants to find and qualify prospects for outbound, or asks who to target first, which signal to prioritize, or where to spot buyers with the problem: buying signals, enrichment, verification, account research.
ad-creative
60.1kWhen the user wants to write or judge ad creative, or asks which ad, hook, or angle to run or kill: headlines, primary text, and variations for Google, Meta, LinkedIn, and TikTok, fresh angles when creative fatigues. Test hypotheses name the metric, comparison, and expected direction.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
