◉CLAUDE LABJP
●2.1.296 — Subagents can set their own autoCompactWindow, and an env var pins the model used by workflow agents●HAIKU 5.5 — Since 2.1.293 (Oct 7), claude-haiku-5-5 is the default Haiku model on the Anthropic API●SONNET 4.5 — Retires on the Claude API on 11/30, 47 days left. Migrate to Sonnet 5.5●Q&A — A write-up shows three places to look when a Mod draws nothing and reports no error●AGENTS.MD — One write-up explains how to split the entry points when Codex and Claude Code share a folder: AGENTS.md and CLAUDE.md●NEW — Approval prompts for "cd, git add, commit" every time: not a missing setting, but how it works●2.1.296 — Subagents can set their own autoCompactWindow, and an env var pins the model used by workflow agents●HAIKU 5.5 — Since 2.1.293 (Oct 7), claude-haiku-5-5 is the default Haiku model on the Anthropic API●SONNET 4.5 — Retires on the Claude API on 11/30, 47 days left. Migrate to Sonnet 5.5●Q&A — A write-up shows three places to look when a Mod draws nothing and reports no error●AGENTS.MD — One write-up explains how to split the entry points when Codex and Claude Code share a folder: AGENTS.md and CLAUDE.md●NEW — Approval prompts for "cd, git add, commit" every time: not a missing setting, but how it works
Articles/Claude Code
⟐ Claude Code/2026-03-10Intermediate

Unity × Claude Code Game Dev Guide — Building AI-Driven Workflows with MCP

Learn to accelerate game development with Unity MCP and Claude Code. Covers scene building, asset management, script generation, and debugging with AI-driven workflows.

Unity3Claude Code261MCP54Game DevelopmentAI8Automation45Script Generation

AI Game Development with Unity MCP

Unity MCP is a bridge that connects AI agents like Claude Code and Cursor directly to the Unity Editor. Through the Model Context Protocol, AI can handle project management, scene construction, asset manipulation, and script generation.

As of 2026, multiple MCP implementations are available including Unity's official package (com.unity.ai.assistant), making Unity operations from Claude Code a practical development approach.

ℹ️
**What Unity MCP Can Do:** - Place and manipulate objects in scenes - Manage project assets (import, search, organize) - Generate and edit C# scripts - Debug build errors with automatic fixes - Analyze and refactor project structure

Setup Methods

Unity Official MCP Package

Using Unity's official AI Assistant package:

# Add via Unity Package Manager
# com.unity.ai.assistant@2.0.0-pre.1

Enable the MCP server from Window → AI → MCP Settings in Unity Editor.

Coplay MCP (Community)

A community implementation providing a broader toolset:

# Add Coplay MCP to Claude Code
claude mcp add unity-mcp -- npx -y @coplay/unity-mcp

IvanMurzak/Unity-MCP

A lightweight bridge connecting AI agents to Unity Editor:

# Add to Claude Code
claude mcp add unity -- npx -y @ivanmurzak/unity-mcp
💡
Regardless of which implementation you choose, the basic mechanism is the same. A local MCP server starts within Unity Editor, and Claude Code connects to it to invoke tools.

Practical Workflows

Automated Scene Construction

Direct Claude Code to build scenes using natural language:

You: Create a forest stage. Flat ground plane, 10 trees randomly placed,
     player spawn point at center.

Claude: I'll build the scene using Unity MCP.
        1. Creating Terrain object (100x100m)
        2. Randomly placing 10 Tree prefabs
        3. Placing SpawnPoint at (0, 0, 0)
        4. Adding Directional Light (sunlight)
        Scene "ForestStage" saved.

Script Generation

Claude Code generates C# game logic scripts and places them directly in your Unity project:

You: Write a player movement script.
     WASD movement, space to jump, Rigidbody-based.

Claude: Creating Assets/Scripts/PlayerMovement.cs.
using UnityEngine;
 
public class PlayerMovement : MonoBehaviour
{
    [SerializeField] private float moveSpeed = 5f;
    [SerializeField] private float jumpForce = 8f;
    [SerializeField] private LayerMask groundLayer;
 
    private Rigidbody rb;
    private bool isGrounded;
 
    void Start()
    {
        rb = GetComponent<Rigidbody>();
    }
 
    void Update()
    {
        float h = Input.GetAxisRaw("Horizontal");
        float v = Input.GetAxisRaw("Vertical");
        Vector3 moveDir = new Vector3(h, 0, v).normalized;
 
        rb.linearVelocity = new Vector3(
            moveDir.x * moveSpeed,
            rb.linearVelocity.y,
            moveDir.z * moveSpeed
        );
 
        if (Input.GetKeyDown(KeyCode.Space) && isGrounded)
        {
            rb.AddForce(Vector3.up * jumpForce, ForceMode.Impulse);
            isGrounded = false;
        }
    }
 
    void OnCollisionEnter(Collision collision)
    {
        if (((1 << collision.gameObject.layer) & groundLayer) != 0)
            isGrounded = true;
    }
}

Asset Management

Search and organize project assets with Claude Code:

You: Find unused textures in the project

Claude: Searching asset database via Unity MCP...
        Found 8 textures not referenced by any scene or script:
        - Assets/Textures/old_grass.png
        - Assets/Textures/test_normal.png
        ...
        Would you like me to delete them?

Debugging and Error Fixing

Claude Code analyzes and fixes build errors and runtime exceptions:

You: There's a compile error. Fix it.

Claude: Checking Unity console logs...
        CS0246: 'PlayerHealth' not found.
        Referenced at Assets/Scripts/GameManager.cs:15.
        PlayerHealth.cs hasn't been created yet. I'll generate a skeleton.

Game Development Patterns

Pattern 1: Rapid Prototyping

Build playable prototypes quickly from ideas with AI:

  1. Describe the game concept to Claude Code
  2. Auto-place scenes and objects via MCP
  3. Generate game logic scripts
  4. Cycle through playtesting → feedback → fixes

Pattern 2: Refactoring Existing Projects

AI assists with organizing large project codebases:

You: Analyze the Scripts folder and find classes with mixed
     responsibilities. Suggest refactoring.

Claude: Analyzing project structure...
        GameManager.cs has 800 lines with mixed responsibilities:
        - Score management → Recommend extracting to ScoreManager
        - UI updates → Recommend extracting to UIManager
        - Save/Load → Recommend extracting to SaveSystem
        Execute refactoring?

Pattern 3: Empowering Indie Developers

For non-programmers and indie developers, Claude Code + Unity MCP dramatically lowers the barrier to game creation. The workflow of describing game logic in natural language and having AI convert it to code enables prototype creation without deep programming expertise.

Security Considerations

⚠️
**Unity MCP Precautions:** - Allow only local connections for MCP servers; never expose to external networks - Always use version control (Git) alongside AI — track and revert AI changes - Mind licensing when letting AI auto-manage paid Asset Store assets - Review all AI-generated code before production builds

Looking back

The combination of Unity MCP and Claude Code has the potential to fundamentally transform game development workflows. By directing scene construction, script generation, asset management, and debugging through natural language, the cycle from idea to implementation is dramatically shortened.

Start with Unity's official com.unity.ai.assistant package or the community's Coplay MCP, and begin by letting AI handle simple scene construction.

Share

Thank You for Reading

Claude Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $15 for lifetime access
View Membership →

If you found this article helpful, a small tip ($1.50) would mean a lot to us. Your support helps keep this site ad-free and covers server and hosting costs.

Related Articles

⟐ Claude Code2026-09-04
The ~/.claude.json Rollback Is Fixed in v2.1.259. Putting Back What It Erased Is Still Your Job
Concurrent sessions used to silently roll back each other's ~/.claude.json changes. v2.1.259 fixed that, but nothing restores the trust settings and MCP servers you already lost. Here is how I find and rebuild them, with a small key-path diff script.
⟐ Claude Code2026-09-01
Drop the quotes on a heredoc and the prices in your log quietly change
An unquoted heredoc runs the variables and backticks inside its body. Here are the four ways my log got rewritten, how the three quoting forms compare, a safe placeholder-and-sed pattern, and a small script for auditing what you already have.
⟐ Claude Code2026-09-01
Once I passed a dozen MCP servers, I stopped trusting the startup list
Only some of the servers that say connection failed at startup are ones you can actually fix. Here is a probe that separates no-response, launch failure, and protocol rejection, measured across a 14-server fleet where sequential 22.03s became parallel 5.09s, and where trimming the deadline quietly turned healthy servers into failures.