Debug Unity — Structured Debugging

VerifiedSafe

A structured debugging workflow for Unity-specific issues (NavMesh, physics, animations, AI, rendering). It guides through reading the environment, categorizing the issue by subsystem, diagnosing with common checks, and fixing one change at a time with validation. Helps when encountering Unity bugs, incorrect configurations, or unexpected behavior in scenes.

Sby Skills Guide Bot
DevelopmentIntermediate
506/2/2026
Claude Code
#unity#debugging#navmesh#animation#physics

Recommended for

Our review

Provides a structured workflow for debugging Unity-specific issues (NavMesh, physics, animations, AI, rendering).

Strengths

  • Systematic coverage of common Unity subsystems
  • Targeted checks for frequent pitfalls (layers, FBX imports, flags)
  • Iterative approach with validation after each change

Limitations

  • Requires MCP access to Unity console for optimal efficiency
  • Does not cover performance or memory issues
  • Relies on user to confirm visual observations
When to use it

When a Unity bug related to navigation, physics, animation, or rendering is detected and requires methodical investigation.

When not to use it

For purely logical issues in C# code that do not involve Unity subsystems.

Security analysis

Safe
Quality score88/100

The skill provides a structured debugging workflow for Unity without instructing any external tool execution or dangerous commands. It is purely an interactive diagnostic guide.

No concerns found

Examples

Debug NavMeshAgent not moving
/debug-unity My player's NavMeshAgent stops moving after a few steps. No errors in console.
Debug animation root motion
/debug-unity The character's animation root motion applies but the character slides instead of staying in place.

Debug Unity — Structured Unity Debugging

This skill provides a structured workflow for debugging Unity-specific issues (NavMesh, physics, animations, AI, rendering).

Instructions

When the user runs /debug-unity, follow this process:

Step 1: Read the Environment

  1. Read the Unity console output (if MCP available)
  2. Read ALL scripts that touch the reported system
  3. Check relevant ScriptableObject configs for incorrect values
  4. Ask: "What do you see in the Scene/Game view? Is the issue in Edit mode, Play mode, or both?"

Step 2: Categorize the Issue

Identify which Unity subsystem is involved:

  • NavMesh/Pathfinding: Check NavMeshAgent settings (baseOffset, speed, acceleration, areaMask), NavMesh bake settings, obstacle layers
  • Physics/Colliders: Check Rigidbody settings, collider dimensions, layer collision matrix, trigger vs collider confusion
  • Animation: Check Animator Controller transitions, root motion settings, avatar configuration, FBX import settings (In Place checkbox)
  • Rendering/Lighting: Check URP settings, light bake, shader compatibility, volume overrides
  • UI: Check Canvas render mode, EventSystem module type (must be InputSystemUIInputModule), sorting order

Step 3: Diagnose

Apply the /diagnose workflow (Steps 1-4 from the diagnose skill).

Step 4: Unity-Specific Checks

Before proposing any fix, verify these common Unity gotchas:

  • [ ] Are serialized field defaults being overridden by saved scene values?
  • [ ] Is the correct layer assigned? (Player=8, Door=9)
  • [ ] Is NavMesh.SamplePosition being called before SetDestination?
  • [ ] Are animations imported as Humanoid (not Generic) if retargeting?
  • [ ] Is keepOriginalPositionY stripped from FBX clips?
  • [ ] Are MonoBehaviours using _isPaused flag instead of enabled=false?

Step 5: Fix and Validate

  • Apply ONE change at a time
  • After each change, check console output
  • Ask user to confirm in the editor
  • If 2 fixes fail, full re-diagnosis from Step 1
Related skills