Open-source Unity AI assistant. Edits scenes, prefabs, materials, and code in chat - and actually understands your project. ChatGPT, Claude, Gemini, Grok, or local models.Code Buddy is an AI assistant built for the Unity Editor. Unlike AI tools that only understand code, Code Buddy understands Unity - your scenes, prefabs, materials, scripts, and shaders. It reads them directly and acts on them through the editor. Generate code, build scenes, configure components, edit materials, and answer questions about your codebase without leaving Unity.Built for solo devs and small teams. Great for rapid prototyping, refactoring legacy code, automating scene and prefab setup, and onboarding to unfamiliar codebases.🔓 Fully open sourceThe full C# source is included. Inspect what runs in your editor, audit how prompts and project context are built, modify Code Buddy to fit your workflow, or build on top of it. No black box.🧩 Extensible by designAdd your own LLM provider, a new tool, or a new agent. The architecture is documented for extension, not just inspection. Make Code Buddy fit your team instead of the other way around.🧠 Project-aware, everywhereCode Buddy reads your scenes, prefabs, materials, ScriptableObjects, scripts, and shaders on demand. Generated code uses your existing classes and conventions correctly. Editor actions operate on real GameObjects with real instance IDs - not invented names. No more copy-pasting context into a web chat.🧭 Three modes, three levels of controlAsk - answer questions about your codebase. Read-only, no surprises.Planner - produce a step-by-step plan you review before any change is made.Assistant - execute changes one file at a time, validate after every write, and stop on errors instead of cascading failures.You always know what the AI is about to do, and you can stop it at any point. Every change supports Ctrl+Z.🎬 Editor automation by chatPlace prefabs, configure components, assign references, edit material and shader properties, modify ScriptableObjects and other serialized assets, inspect prefab hierarchies, capture scene screenshots, send reference images, and read Unity logs to debug — all in natural language. Multi-scene setups and all render pipelines (URP, HDRP, Built-in) are supported.🤝 Use any LLM, no subscriptionOne-time Asset Store purchase. Works with OpenAI, Anthropic Claude, Google Gemini, DeepSeek, and xAI Grok — bring your own API key and pay providers directly at pay-as-you-go rates. Or run completely offline with Ollama or LM Studio for zero ongoing cost. Switch providers in one click.⚡ 70 to 90% fewer tokens per callSmart context throttling sends only what the LLM actually needs for each tool call — 70 to 90% fewer tokens than naive whole-project approaches. Lower per-call costs, faster responses, and larger projects supported.🛡 Privacy firstYour code never leaves your machine except as the small slices of context Code Buddy actively sends to your chosen LLM. With Ollama or LM Studio, nothing leaves at all. API keys are encrypted and stored locally.🌍 Proxy and languages supportRoute API requests through a proxy if your region blocks access to LLM providers. Right-to-left languages support included.⚠️ IMPORTANT ⚠️Requires user setup of one of the following:OpenAI API Key (does not work with ChatGPT Plus subscription)Anthropic Claude API KeyGoogle Gemini API KeyDeepSeek API KeyxAI Grok API KeyOllama installed locally (free, offline)LM Studio installed locally (free, offline)Join Discord to see the roadmap and request features.JOIN DISCORD | DOCUMENTATION FeaturesOpen source - full C# source includedExtensible architecture - add custom providers, tools, and agents (single file each)Multi-agent system: Ask (read-only Q&A), Planner (review before execution), Assistant (stepwise execution)Smart context throttling - 70-90% fewer tokens per tool callProject-aware code generationScript and shader file creation and editingCode modification, refactoring, and bug fixingCode explanation and brainstormingGameObject creation and modificationComponent assignment and value editingPrefab hierarchy inspection and instantiationMaterial, shader, and serialized asset inspection and editingUnity log reading and in-chat debuggingScene screenshot capture and image inputMulti-scene supportCtrl+Z undo support for all editor changesAll render pipelines (URP, HDRP, Built-in)Offline mode via Ollama and LM StudioProxy supportRight-to-left language supportSupported providersOpenAIGeminiDeepSeekClaudeGrok (xAI)OllamaLM StudioSupported Unity version2022.36000.xIt most likely works with any version in between, we just didn't test them all.AI was used to assist with coding.


