Reasons for bad AI results typically stem from the following issues:
-
Using Free or unthinking models. All the most capable tools are usually either behind a paywall, or require you to manually enable a multi step reasoning mode (like ChatGPT Extended Thinking, Gemini 3.1 Thinking, or Claude Extended Thinking). These extended thinking modes generally produce much higher quality results with fewer hallucinations. However, using a standard web UI is still arguably the worst way to generate code because of the manual context you have to provide, which leads to the next big issue.
-
Lack of Context. A generic question will always yield a generic response. There is a certain art to writing prompts in web UIs just to get something usable. Because a web chat can’t see your actual project structure, it’s highly likely to spit out code that completely clashes with your overall architecture or confidently invents APIs that don’t actually exist in your other scripts. You end up losing a massive amount of time just typing out context - explaining your project architecture, what input system you’re using, which render pipeline you need, copy pasting existing scripts as part of the prompt, etc.
-
Limited memory, especially in free tiers. After a few prompts in a new chat, the memory limits are reached and it starts to forget, hallucinate and generally degrade. You have to constantly create new chats for each iteration of the script, and each time you have to manually re-enter context.
Most of these issues are addressed by using agent mode.
Right now, my preferred workflow for getting genuinely good AI results in Unity is using the Rider IDE + GitHub Copilot plugin in Agent Mode. I use Claude Opus 4.6 for the high level planning phase and Claude Sonnet 4.6 for the actual implementation (since it keeps costs down). Rider has deep Unity integration, so the agent can access a lot of it from your existing project architecture, to input system asset contents and anything else that’s project specific.
In Copilot’s planning mode, you can prompt the AI to cover edge cases you’ve already predicted. The AI will then catch some you missed or ask for clarification on specific implementation details. Once the plan is locked in, the agent automatically executes it: creating new script files, editing existing ones, running error checks, and automatically fixing any compilation errors that pop up.
A solid plan almost always results in a solid implementation that naturally aligns with the rest of your project. And if it does not, Copilot has checkpoints so you can immediately discard changes from the last session or you can ask agent to make further changes to align with your goals.
I have plans to check out Claude Code and OpenAI Codex to see how their pricing/agents work in Rider (if at all). Free version of GitHub Copilot has basic models available in agent mode, which is not what you want. You need at least the $10 tier to get to check out the good stuff.