r/ClaudeCode • • 4d ago

Help/Question Any resources or guides about Claude Code for Unity/Gamedev?

I've been experimenting with using Claude Code with the Unity engine, and I have slowly started to develop a decent system where I could talk out the code/implementation, reason out what scripts I wanted and where that code would live, and then script by script Claude would explain how it would write them and if I agreed it would write them into the game. If there was anything I didn't understand, I could ask Claude to explain it. At some point I hooked up the MPC so it could add things to the project directly and run tests in engine which helped a ton with bug fixing. It works, but I've just kind of been winging it. I want to make sure I'm getting the most out of an AI assisted workflow.

Anyone got advice? Are there guides? Youtube videos?

1 Upvotes

12 comments sorted by

•

u/AutoModerator 4d ago

Hey! Thanks for posting to r/ClaudeCode

While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.

For help, project discussions, tips, and general chat, join the ClaudeCode Discord.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/hieuphung97 4d ago

For a practical workflow, try a tiny feature in a throwaway scene first and keep it in version control. Ask for Edit Mode tests for pure logic and Play Mode tests for scene interactions, then play the scene yourself for feel and visuals. Review scene and prefab diffs carefully before accepting changes.

2

u/ChaosMilkTea 2d ago

Sandbox scenes is a good idea. Ill keep that in mind.

For the most part I havent let Claude do much in the editor. Its been 90% code and the other 10% diagnostics for bugs after I do testing.

What does Claude handle well in editor?

1

u/hieuphung97 2d ago

Custom editor scripts are the sweet spot. Having it write MenuItem utilities to batch-wire serialized fields or validate broken asset references saved us tons of clicking, while keeping raw scene YAML untouched.

2

u/ChaosMilkTea 2d ago

I had it write up a few editor scripts later on to speed up repetitive tasks or update objects with complex hierarchies. I could imagine extending that to save lots of other tedium.

1

u/hieuphung97 2d ago

Hierarchy scripts are huge time-savers. Just wrap your batch mutations in Undo.RecordObject before running them across nested prefabs so you do not accidentally nuke an afternoon of scene staging.

1

u/No-Advisor-4882 4d ago

Your setup already sounds solid — having it run tests in-engine through MCP is the big unlock most people miss. A few things that helped me in game projects: keep an instructions file with your architecture (which systems exist, where scripts live, naming, what not to touch like scenes and prefabs by hand), so it doesn't invent a parallel structure. Ask for one system at a time with a playable check at the end ("I can jump and land without clipping"). And commit after each working step — Unity changes (scenes, meta files) are painful to untangle if something goes wrong mid-way.

1

u/ChaosMilkTea 2d ago

Yeah keeping Claude up to date on design changes has been a little tough. I might change my mind on how to handle some visual effect and then another conversation acts under the assumption of the old plan and seems surprised I want something else now. It makes sense, its just annoying to have to tell it every time ive changed my mind across multiple chats.

1

u/smermetfr 2d ago

the biggest upgrade for me was a CLAUDE.md at the repo root spelling out Unity conventions: where scripts live, naming, how to run tests, which packages are off limits. it stops re-deriving your architecture every session. curious how you're handling scene and prefab edits, that's where mine still falls apart.

1

u/ChaosMilkTea 2d ago

I so far have only let Claude touch code. Everything in editor has been me. Ive been doing hobby game dev on and off over the years so it has been a slow process of seeing what Im comfortable letting Claude handle. It took me a while to trust it with even the code. Now Im like "ok we talked about it. Write it up and yeet it in."

1

u/LakeResearchTeam 4d ago

A few things tend to help a lot with engine projects. Put a CLAUDE.md in the project root with your folder layout, naming conventions and rules like 'never edit .meta files or scenes by hand', and keep it short so it doesn't eat context. Use plan mode (Shift+Tab) so it lays out which scripts it will touch before writing anything, and commit to git before each task so you can roll back a bad change cleanly. Keep tasks small, one system or script at a time, and use /clear between unrelated tasks so old context doesn't muddy things. If you find yourself repeating the same checks, a hook in settings.json can run your tests or a compile check automatically after edits.