← Back to blog

Unity Game Engine MCP Plugin: Boost Your Game Development Workflow

Walk through the VberAI Unity MCP Plugin demo: connect Unity to AI tools via MCP and drive GameObjects, scripts, and scenes with natural language.

Published
  • video
  • tutorial
  • unity
  • mcp
Watch on YouTube

In this article, we walk through the Unity Game Engine MCP Plugin demonstration featured on the VberAI YouTube channel. The video shows how to connect Unity with AI-powered tools using the Model Context Protocol (MCP), enabling you to generate and modify game objects, scripts, and scenes through natural language commands. This written guide breaks down the key steps, prerequisites, and practical tips so you can follow along and start using the plugin in your own Unity projects.

What the Video Demonstrates

The 98-second video showcases the Unity MCP Plugin in action. MCP (Model Context Protocol) is an open standard that allows AI assistants to interact directly with development tools. In this case, the plugin bridges Unity with VberAI AI Studio (AI Studio), a platform that runs AI models capable of understanding and executing game development tasks.

Key highlights from the video include:

  • Installing the Unity MCP Plugin package
  • Configuring the plugin to connect with a local or cloud-based AI model
  • Using natural language commands to create new GameObjects (e.g., “add a sphere”)
  • Modifying existing objects (e.g., “change the cube color to red”)
  • Generating C# scripts from text descriptions
  • Running scene operations like duplicating objects or adjusting transforms

The entire workflow is performed inside Unity’s Editor, with the AI responding to your typed or spoken instructions in real time.

Prerequisites

Before you try the steps shown in the video, make sure you have the following:

Software Requirements

  • Unity Hub and Unity Editor (2021.3 LTS or newer recommended)
  • .NET SDK (version 6.0 or higher) – required for MCP plugin dependencies
  • Python 3.8+ (if using a local AI model via the MCP bridge)
  • Git (for cloning the plugin repository if needed)

Account & Setup

  • A VberAI account (free tier available) – needed to access AI Studio
  • The Unity MCP Plugin – download from the official repository or package manager
  • An AI model endpoint – either a local model (e.g., via Ollama) or a cloud API key (e.g., OpenAI, Anthropic)

Optional but Helpful

  • Basic familiarity with Unity’s Editor interface (Scene view, Hierarchy, Inspector)
  • Understanding of C# scripting concepts (for script generation examples)
  • A test project (create a new empty 3D project to experiment safely)

Step-by-Step Walkthrough

Follow these steps to replicate the video demonstration.

1. Install the Unity MCP Plugin

The plugin is distributed as a Unity package. You can add it via the Package Manager using a Git URL:

  1. Open your Unity project.
  2. Go to Window > Package Manager.
  3. Click the + button and select “Add package from git URL…”
  4. Enter the plugin’s Git repository URL (e.g., https://github.com/vberai/unity-mcp-plugin.git)
  5. Click Add.

Alternatively, if you have a .unitypackage file, import it via Assets > Import Package > Custom Package.

2. Configure the MCP Connection

Once installed, you need to tell the plugin where to find your AI model.

  1. In Unity, open Window > MCP Plugin > Settings.
  2. In the Endpoint field, enter your AI model’s URL:
    • For VberAI AI Studio: use the provided API endpoint (e.g., https://api.vberai.com/v1/chat)
    • For local models: use your local server address (e.g., http://localhost:11434/v1)
  3. If required, paste your API key in the Auth field.
  4. Set the Model name (e.g., gpt-4, claude-3, or llama3).
  5. Click Save.

The plugin will now attempt a handshake. A green “Connected” indicator confirms success.

3. Send Your First Command

With the connection active, open the MCP command window: Window > MCP Plugin > Command Input.

Type a simple instruction like:

Create a red cube at position (0, 1, 0)

Press Enter or click Send. The AI will process the command and execute it in your Unity scene. You should see a red cube appear in the Game view.

4. Advanced Commands

The video demonstrates several more powerful operations. Try these examples:

  • Modify objects: Change the cube's scale to 2 on all axes
  • Add components: Add a Rigidbody to the sphere
  • Generate scripts: Create a C# script called "Rotator" that rotates the object around the Y axis
  • Scene management: Duplicate the cylinder and place it 3 units to the right

Each command is parsed by the AI, which then calls the appropriate Unity API functions through the MCP bridge.

5. Script Generation Workflow

One of the most useful features is AI-assisted script writing. When you ask for a script, the plugin:

  1. Generates the C# code in a temporary buffer
  2. Creates a new .cs file in your project’s Scripts folder
  3. Attaches the script to the currently selected GameObject (if applicable)

You can review and edit the generated script in your IDE before using it.

Practical Tips & Common Issues

Here are some insights from the video and real-world usage to help you avoid pitfalls.

Command Structure

  • Be specific: “Create a blue sphere with radius 0.5” works better than “Make a ball”
  • Use Unity terminology: “Add a BoxCollider component” is more reliable than “Make it solid”
  • For complex scenes, break requests into multiple commands

Troubleshooting Connection Errors

If the plugin shows “Disconnected”:

  • Verify your API key is valid and not expired
  • Check that your firewall allows outbound connections to the endpoint
  • For local models, ensure the server is running (ollama serve on the command line)
  • Restart Unity after changing settings

Performance Notes

  • Cloud models (like those in AI Studio) respond faster than local models
  • Complex scene operations (e.g., duplicating 100 objects) may take a few seconds
  • Keep your Unity project saved before running destructive commands

Frequently Asked Questions

Q: Does this plugin work with Unity 6? A: Yes, the plugin is compatible with Unity 2021.3 LTS and newer, including Unity 6. Some advanced features may require Unity 2022.3+.

Q: Can I use any AI model with this plugin? A: The plugin supports any model that exposes an OpenAI-compatible chat completion API. This includes models from VberAI, OpenAI, Anthropic, and local models via Ollama or LM Studio.

Q: Is my project data safe when using cloud models? A: Commands and scene descriptions are sent to the AI endpoint. For sensitive projects, consider using a local model that runs entirely on your machine.

Q: Can the plugin modify existing scripts? A: Yes, you can ask it to update a script. For example: “Add a public float speed variable to the PlayerController script.”

Q: Where can I find more command examples? A: The plugin’s documentation includes a command reference. You can also experiment by asking the AI: “What commands can you execute in Unity?”

Next Steps

The Unity MCP Plugin opens up a new way to interact with your game projects. Instead of manually clicking through menus or writing boilerplate code, you can describe what you want and let the AI handle the implementation.

To get the most out of this workflow, explore VberAI AI Studio for a curated selection of AI models optimized for game development tasks. The platform provides pre-configured endpoints that work seamlessly with the Unity MCP Plugin, saving you setup time.

For more tutorials and updates, subscribe to the VberAI YouTube channel and check out additional MCP plugin guides for other game engines.

More guides you might like