1:"$Sreact.fragment" 2:I[3361,["619","static/chunks/619-ba102abea3e3d0e4.js","558","static/chunks/app/layout-8ed3165a2efc4aed.js"],"default"] 3:I[8320,["619","static/chunks/619-ba102abea3e3d0e4.js","558","static/chunks/app/layout-8ed3165a2efc4aed.js"],"default"] 4:I[9766,[],""] 5:I[8924,[],""] 6:I[2619,["619","static/chunks/619-ba102abea3e3d0e4.js","177","static/chunks/app/guides/stemcode-unity-developers/page-0aa623f29d826b1a.js"],""] 7:I[9526,["619","static/chunks/619-ba102abea3e3d0e4.js","558","static/chunks/app/layout-8ed3165a2efc4aed.js"],"default"] 8:I[1503,["619","static/chunks/619-ba102abea3e3d0e4.js","558","static/chunks/app/layout-8ed3165a2efc4aed.js"],"default"] 9:I[2067,["619","static/chunks/619-ba102abea3e3d0e4.js","558","static/chunks/app/layout-8ed3165a2efc4aed.js"],"default"] a:I[271,["619","static/chunks/619-ba102abea3e3d0e4.js","558","static/chunks/app/layout-8ed3165a2efc4aed.js"],"default"] 10:I[7150,[],""] :HL["/_next/static/css/a106fc8500d469f6.css","style"] b:T429,{"@context":"https://schema.org","@type":"BlogPosting","headline":"StemCode for Unity Developers: C#, Scenes, Tests, and Project-Aware AI Coding","description":"Set up StemCode for Unity projects with C# scripts, Assets, Packages, ProjectSettings, Unity command-line automation, testing, refactoring, and Git review.","datePublished":"2026-10-01","dateModified":"2026-10-01","author":{"@type":"Organization","name":"GrowBitLabs","url":"https://growbitlabs.com"},"publisher":{"@type":"Organization","name":"GrowBitLabs","url":"https://growbitlabs.com"},"mainEntityOfPage":"https://growbitlabs.com/guides/stemcode-unity-developers","url":"https://growbitlabs.com/guides/stemcode-unity-developers","keywords":"StemCode Unity, Unity AI coding agent, Unity C# AI assistant, Unity CLI, Unity command line, Unity batchmode, Unity project AI, Unity refactoring AI, Unity code review AI","about":{"@type":"SoftwareApplication","name":"StemCode","applicationCategory":"DeveloperApplication","operatingSystem":"Windows, macOS, Linux","url":"https://growbitlabs.com/stemcode"}}0:{"P":null,"b":"52mZGPOTbZG1yQUVMfwha","p":"","c":["","guides","stemcode-unity-developers"],"i":false,"f":[[["",{"children":["guides",{"children":["stemcode-unity-developers",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],["",["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/a106fc8500d469f6.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"children":["$","$L2",null,{"children":[["$","div",null,{"className":"scroll-progress","id":"scrollProgress"}],["$","$L3",null,{}],["$","main",null,{"id":"top","children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","section",null,{"className":"inner-hero","children":["$","div",null,{"className":"container","children":[["$","div",null,{"className":"inner-eyebrow reveal","children":[["$","span",null,{"children":"404"}],["$","i",null,{}],["$","span",null,{"children":"PAGE NOT FOUND"}]]}],["$","div",null,{"className":"inner-hero-copy reveal","children":[["$","h1",null,{"children":["This page took a wrong ",["$","em",null,{"children":"turn."}]]}],["$","p",null,{"children":"The address may have changed, or the page may no longer be available."}],["$","div",null,{"className":"inner-hero-actions","children":[["$","$L6",null,{"className":"btn primary","href":"/","children":"GO HOME"}],["$","$L6",null,{"className":"btn text","href":"/stemcode","children":"VIEW STEMCODE →"}]]}]]}]]}]}],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}],["$","$L7",null,{}],["$","footer",null,{"className":"site-footer","children":["$","div",null,{"className":"container footer-shell","children":[["$","div",null,{"className":"footer-brand-block","children":[["$","$L6",null,{"className":"brand brand-footer","href":"/","aria-label":"GrowBitLabs home","children":["$","img",null,{"className":"brand-logo","src":"/assets/logo.png","alt":"GrowBitLabs logo"}]}],["$","p",null,{"children":"Home of StemCode and GrowBit Convo. Local-first AI development, private AI infrastructure, and agent engineering."}]]}],["$","div",null,{"className":"footer-columns","children":[["$","nav",null,{"aria-label":"Solutions links","children":[["$","strong",null,{"children":"SOLUTIONS"}],["$","$L6",null,{"href":"/stemcode","children":"StemCode"}],["$","$L6",null,{"href":"/stemcode-survey","children":"StemCode Survey"}],["$","$L6",null,{"href":"/compare","children":"StemCode Comparisons"}],["$","$L6",null,{"href":"/growbit-convo","children":"GrowBit Convo"}],["$","$L6",null,{"href":"/open-models","children":"Open Models"}],["$","$L6",null,{"href":"/pricing","children":"Pricing"}],["$","$L6",null,{"href":"/enterprise","children":"Enterprise"}],["$","$L6",null,{"href":"/docs","children":"StemCode Docs"}],["$","$L6",null,{"href":"/guides","children":"Developer Guides"}]]}],["$","nav",null,{"aria-label":"Company links","children":[["$","strong",null,{"children":"COMPANY"}],["$","$L6",null,{"href":"/about","children":"About"}],["$","$L6",null,{"href":"/services","children":"Services"}],["$","$L6",null,{"href":"/contact","children":"Contact"}],["$","$L6",null,{"href":"/careers","children":"Careers"}],["$","$L6",null,{"href":"/press","children":"Press"}]]}],["$","nav",null,{"aria-label":"Legal links","children":[["$","strong",null,{"children":"LEGAL"}],["$","$L6",null,{"href":"/privacy","children":"Privacy Policy"}],["$","$L6",null,{"href":"/terms","children":"Terms of Service"}],["$","$L8",null,{}]]}],["$","nav",null,{"aria-label":"Social links","children":[["$","strong",null,{"children":"SOCIAL"}],["$","a",null,{"href":"https://www.linkedin.com/company/growbitlabs","target":"_blank","rel":"noopener noreferrer","children":"LinkedIn"}],["$","a",null,{"href":"https://www.facebook.com/growbitlabs/","target":"_blank","rel":"noopener noreferrer","children":"Facebook"}]]}]]}],["$","div",null,{"className":"footer-bottom","children":[["$","span",null,{"children":["(c) ",["$","span",null,{"id":"year"}]," GrowBitLabs"]}],["$","span",null,{"children":"StemCode + GrowBit Convo"}]]}]]}]}],["$","$L9",null,{}],["$","$La",null,{}]]}]}]}]]}],{"children":["guides",["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["stemcode-unity-developers",["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["__PAGE__",["$","$1","c",{"children":[[["$","script",null,{"type":"application/ld+json","dangerouslySetInnerHTML":{"__html":"$b"}}],"$Lc","$Ld"],null,"$Le"]}],{},null,false]},null,false]},null,false]},null,false],"$Lf",false]],"m":"$undefined","G":["$10",[]],"s":false,"S":true} 1e:I[4431,[],"OutletBoundary"] 20:I[5278,[],"AsyncMetadataOutlet"] 22:I[4431,[],"ViewportBoundary"] 24:I[4431,[],"MetadataBoundary"] 25:"$Sreact.suspense" c:["$","section",null,{"className":"inner-hero docs-hero","children":["$","div",null,{"className":"container","children":[["$","div",null,{"className":"inner-eyebrow reveal","children":[["$","$L6",null,{"href":"/guides","children":"RESOURCES / GUIDES"}],["$","i",null,{}],["$","span",null,{"children":"UNITY"}]]}],["$","div",null,{"className":"inner-hero-copy reveal","children":[["$","h1",null,{"children":["StemCode for Unity Developers: AI Coding with ",["$","em",null,{"children":"C# and real project context."}]]}],["$","p",null,{"children":"Set up StemCode for Unity projects with C# scripts, Assets, Packages, ProjectSettings, Unity command-line automation, testing, refactoring, and Git review."}],["$","div",null,{"className":"inner-hero-actions docs-hero-actions","children":[["$","a",null,{"className":"btn primary","href":"#setup","children":"START SETUP"}],["$","$L6",null,{"className":"btn text","href":"/stemcode","children":"EXPLORE STEMCODE →"}]]}],["$","div",null,{"className":"docs-meta-strip","aria-label":"Guide metadata","children":[["$","span",null,{"children":["PUBLISHED ","2026-10-01"]}],["$","span",null,{"children":"STEMCODE DEVELOPER GUIDE"}],["$","span",null,{"children":"LOCAL-FIRST AI CODING"}]]}]]}]]}]}] 11:T606,# Unity Project Instructions This is a Unity project. Important source and configuration paths: - Assets/Scripts/ - Assets/ - Packages/ - ProjectSettings/ - *.asmdef - *.cs Generated or disposable paths — do not modify: - Library/ - Temp/ - Obj/ - Logs/ - UserSettings/ - Build/ - Builds/ Follow these rules: - This is a Unity C# project. - Main gameplay scripts are under Assets/Scripts/. - Use standard Unity C# conventions. - Prefer components over large monolithic scripts. - Do not modify Library/, Temp/, Obj/, Logs/, UserSettings/, or generated build output. - Do not modify scene or prefab YAML manually unless specifically requested. - Preserve existing serialized field names unless a rename is intentional. - Check for Unity lifecycle implications when changing Awake, Start, Update, FixedUpdate, OnEnable, and OnDisable. - Keep runtime and Editor-only code separated. - Explain required Inspector setup after creating or changing a component. - Avoid introducing packages unless they are necessary. - Use the project's checked-in Unity CLI wrapper or exact Editor version for automated validation. - After modifying C# code, check for likely Unity compilation errors and run relevant tests. Validation: - "" -batchmode -projectPath . -runTests -testPlatform EditMode -testResults TestResults/editmode.xml -logFile - - "" -batchmode -projectPath . -runTests -testPlatform PlayMode -testResults TestResults/playmode.xml -logFile - - Use the same Unity build or test wrapper used by CI when availabled:["$","section",null,{"className":"docs-layout section","children":["$","div",null,{"className":"container docs-shell docs-shell-wide","children":[["$","aside",null,{"className":"docs-sidebar","aria-label":"Guide table of contents","children":[["$","span",null,{"className":"toc-label","children":"GUIDE"}],["$","$L6",null,{"href":"/guides","children":"All developer guides"}],["$","$L6",null,{"href":"/stemcode","children":"StemCode overview"}],["$","$L6",null,{"href":"/docs","children":"StemCode docs"}],["$","span",null,{"className":"toc-label","children":"ON THIS PAGE"}],["$","a",null,{"href":"#agents-md","children":"AGENTS.md project instructions"}],[["$","a","#why",{"href":"#why","children":"Why StemCode"}],["$","a","#setup",{"href":"#setup","children":"Install and set up"}],["$","a","#project",{"href":"#project","children":"Project context"}],["$","a","#intelligence",{"href":"#intelligence","children":"Code intelligence"}],["$","a","#cli",{"href":"#cli","children":"Native CLI"}],["$","a","#workflow",{"href":"#workflow","children":"Development workflow"}],["$","a","#validation",{"href":"#validation","children":"Build and test"}],["$","a","#memory",{"href":"#memory","children":"Project memory"}],["$","a","#review",{"href":"#review","children":"Review changes"}],["$","a","#faq",{"href":"#faq","children":"FAQ"}]]]}],["$","article",null,{"className":"docs-content","children":[["$","section",null,{"id":"agents-md","className":"docs-section reveal","children":[["$","span",null,{"children":"PROJECT INSTRUCTIONS / AGENTS.MD"}],["$","h2",null,{"children":"Give StemCode durable repository instructions before asking it to edit."}],["$","p",null,{"children":["Add an ",["$","code",null,{"children":"AGENTS.md"}]," file at the repository root for persistent project instructions. StemCode loads",["$","code",null,{"children":" AGENTS.md"}]," or ",["$","code",null,{"children":".agent/AGENTS.md"}]," from the workspace into the model context, so this is the right place for architecture boundaries, generated-file rules, coding conventions, validation expectations, and manual setup notes that should apply across sessions."]}],["$","div",null,{"className":"docs-note","children":[["$","b",null,{"children":"Keep AGENTS.md practical and repository-specific"}],["$","p",null,{"children":"Prefer concrete rules the agent can act on: where important source lives, what it must not edit, which patterns it should preserve, and which checks it should run after a change."}]]}],["$","pre",null,{"children":["$","code",null,{"children":"$11"}]}],"$L12"]}],["$L13","$L14","$L15","$L16","$L17","$L18","$L19","$L1a","$L1b","$L1c"],"$L1d"]}]]}]}] e:["$","$L1e",null,{"children":["$L1f",["$","$L20",null,{"promise":"$@21"}]]}] f:["$","$1","h",{"children":[null,[["$","$L22",null,{"children":"$L23"}],null],["$","$L24",null,{"children":["$","div",null,{"hidden":true,"children":["$","$25",null,{"fallback":null,"children":"$L26"}]}]}]]}] 12:["$","p",null,{"children":"Commit the file with the project so the same instructions are reviewable and shared by everyone using StemCode in the repository."}] 13:["$","section",null,{"id":"why","className":"docs-section reveal","children":[["$","span",null,{"children":"01 / WHY STEMCODE"}],["$","h2",null,{"children":"Use repository-aware AI without replacing the tools your stack already needs."}],["$","p",null,{"children":"StemCode works best when it can understand the repository around a task, inspect related files, use code intelligence where available, run the project's normal validation commands, and review the final diff before you accept a change."}],["$","div",null,{"className":"docs-callout docs-callout-strong","children":[["$","strong",null,{"children":["GOOD FIT FOR ","UNITY"," WORK"]}],["$","p",null,{"children":"Unity games and interactive applications using C#, MonoBehaviour components, ScriptableObjects, editor tooling, packages, Edit Mode and Play Mode tests, prefabs, scenes, Unity command-line automation, and normal Git workflows."}]]}]]}] 14:["$","section",null,{"id":"setup","className":"docs-section reveal","children":[["$","span",null,{"children":"02 / SETUP"}],["$","h2",null,{"children":"Install StemCode and open the project root."}],["$","p",null,{"children":"Install StemCode separately from Unity, then launch it from the Unity project root. Keep using the Unity Editor for scene authoring, Inspector work, profiling, Play Mode, package management, and platform builds."}],["$","div",null,{"className":"doc-command","children":[["$","b",null,{"children":"npm"}],["$","code",null,{"children":"npm install -g stemcode"}]]}],["$","div",null,{"className":"doc-command","children":[["$","b",null,{"children":"pnpm"}],["$","code",null,{"children":"pnpm add -g stemcode"}]]}],["$","pre",null,{"children":["$","code",null,{"children":["cd your-project","\n","stemcode","\n","/init"]}]}],["$","p",null,{"children":"Keep StemCode at the repository root so project instructions, source, configuration, tests, and Git history are visible from one workspace."}]]}] 15:["$","section",null,{"id":"project","className":"docs-section reveal","children":[["$","span",null,{"children":"03 / PROJECT CONTEXT"}],["$","h2",null,{"children":"Give the agent Unity source and settings without flooding it with generated files."}],["$","p",null,{"children":"A useful Unity workspace includes authored assets, C# code, package manifests, and project settings. Unity also produces large generated directories that usually add noise to repository search."}],["$","div",null,{"className":"docs-grid-2","children":[["$","div",null,{"className":"docs-feature-card","children":[["$","span",null,{"children":"INSPECT"}],["$","h3",null,{"children":"Keep source-of-truth files visible."}],["$","pre",null,{"children":["$","code",null,{"children":"Assets/Scripts/\nAssets/\nPackages/\nProjectSettings/\n*.asmdef\n*.cs"}]}]]}],["$","div",null,{"className":"docs-feature-card","children":[["$","span",null,{"children":"IGNORE"}],["$","h3",null,{"children":"Skip generated or disposable output."}],["$","pre",null,{"children":["$","code",null,{"children":"Library/\nTemp/\nObj/\nLogs/\nUserSettings/\nBuild/\nBuilds/"}]}]]}]]}],["$","p",null,{"children":["Add generated paths to Git ignore rules or",["$","code",null,{"children":" .stemcode/.stemcodeignore"}]," so repository search stays focused."]}],["$","div",null,{"className":"docs-feature-card","children":[["$","span",null,{"children":"FIRST PROMPT"}],["$","h3",null,{"children":"Understand the project before changing it."}],["$","p",null,{"children":"Analyze this Unity project. Identify the important scenes, assemblies, gameplay systems, ScriptableObjects, editor code, packages, and test layout. Explain how the main runtime systems connect. Do not modify files yet."}]]}]]}] 16:["$","section",null,{"id":"intelligence","className":"docs-section reveal","children":[["$","span",null,{"children":"04 / CODE INTELLIGENCE"}],["$","h2",null,{"children":"Use C# language intelligence alongside Unity-aware repository search."}],["$","p",null,{"children":"Unity C# projects benefit from definitions, references, diagnostics, and symbol navigation. A C# language server can complement repository search when gameplay code is spread across assemblies and packages."}],[["$","div","CSHARP-LS-dotnet tool install --global csharp-ls",{"className":"doc-command","children":[["$","b",null,{"children":"CSHARP-LS"}],["$","code",null,{"children":"dotnet tool install --global csharp-ls"}]]}]],["$","pre",null,{"children":["$","code",null,{"children":["/lsp refresh","\n","/lsp"]}]}],["$","div",null,{"className":"docs-note","children":[["$","b",null,{"children":"Use both semantic navigation and repository search"}],["$","p",null,{"children":"Use semantic navigation for C# symbols, but keep Unity-specific context in view: serialized fields, assembly definitions, package boundaries, editor-only code, and lifecycle methods such as Awake, OnEnable, Start, Update, and FixedUpdate can change behavior even when a refactor compiles."}]]}]]}] 17:["$","section",null,{"id":"cli","className":"docs-section reveal","children":[["$","span",null,{"children":"05 / NATIVE CLI"}],["$","h2",null,{"children":"Use the Unity Editor executable as the project CLI."}],["$","p",null,{"children":"Unity does not require a separate project CLI package: the Editor executable accepts command-line arguments for unattended imports, tests, custom build methods, and CI. Use the exact Editor version declared by the project and keep its machine-specific path in an environment variable or repository script instead of hard-coding it into prompts."}],[["$","div","EDIT MODE TESTS-\"\" -batchmode -projectPath . -runTests -testPlatform EditMode -testResults TestResults/editmode.xml -logFile -",{"className":"doc-command","children":[["$","b",null,{"children":"EDIT MODE TESTS"}],["$","code",null,{"children":"\"\" -batchmode -projectPath . -runTests -testPlatform EditMode -testResults TestResults/editmode.xml -logFile -"}]]}],["$","div","PLAY MODE TESTS-\"\" -batchmode -projectPath . -runTests -testPlatform PlayMode -testResults TestResults/playmode.xml -logFile -",{"className":"doc-command","children":[["$","b",null,{"children":"PLAY MODE TESTS"}],["$","code",null,{"children":"\"\" -batchmode -projectPath . -runTests -testPlatform PlayMode -testResults TestResults/playmode.xml -logFile -"}]]}],["$","div","CUSTOM BUILD-\"\" -batchmode -quit -projectPath . -executeMethod BuildScript.PerformBuild -logFile -",{"className":"doc-command","children":[["$","b",null,{"children":"CUSTOM BUILD"}],["$","code",null,{"children":"\"\" -batchmode -quit -projectPath . -executeMethod BuildScript.PerformBuild -logFile -"}]]}]],["$","p",null,{"children":"Replace with the Editor executable for the project’s installed Unity version. Keep custom build entry points in Editor code, make them deterministic, and prefer a checked-in wrapper script such as scripts/unity-test or scripts/unity-build so StemCode and CI invoke the same command."}]]}] 18:["$","section",null,{"id":"workflow","className":"docs-section reveal","children":[["$","span",null,{"children":["06"," / DEVELOPMENT WORKFLOW"]}],["$","h2",null,{"children":"Separate C# implementation from Editor-owned scene and asset work."}],["$","p",null,{"children":"Ask StemCode to change scripts and text configuration precisely, then use the Unity Editor for visual authoring and validation. Be cautious with serialized YAML and binary assets."}],["$","div",null,{"className":"docs-grid-2","children":[["$","div","Add a gameplay system",{"className":"docs-feature-card","children":[["$","span",null,{"children":"FEATURE"}],["$","h3",null,{"children":"Add a gameplay system"}],["$","p",null,{"children":"Trace existing gameplay patterns, then implement a player health system under the current architecture. Reuse existing events and UI patterns, add tests where the project already uses them, and list any Inspector wiring required afterward."}]]}],["$","div","Change lifecycle code safely",{"className":"docs-feature-card","children":[["$","span",null,{"children":"REFACTOR"}],["$","h3",null,{"children":"Change lifecycle code safely"}],["$","p",null,{"children":"Review this MonoBehaviour hierarchy for duplicated Update work, hidden allocations, event subscription leaks, and execution-order assumptions. Propose a small refactor before editing."}]]}],["$","div","Respect Unity-owned assets",{"className":"docs-feature-card","children":[["$","span",null,{"children":"EDITOR"}],["$","h3",null,{"children":"Respect Unity-owned assets"}],["$","p",null,{"children":"Implement the C# side of this feature without manually rewriting scene or prefab YAML unless the repository already treats those files as reviewed source and the change is explicitly required."}]]}],["$","div","Trace runtime behavior",{"className":"docs-feature-card","children":[["$","span",null,{"children":"BUG"}],["$","h3",null,{"children":"Trace runtime behavior"}],["$","p",null,{"children":"Trace this bug from input through component state, physics or animation interactions, and scene dependencies. Explain the likely cause before modifying code."}]]}]]}]]}] 19:["$","section",null,{"id":"validation","className":"docs-section reveal","children":[["$","span",null,{"children":["07"," / BUILD AND TEST"]}],["$","h2",null,{"children":"Use Unity tests and project compilation as the source of truth."}],["$","p",null,{"children":"Prefer the checked-in Unity CLI wrapper or CI command used by the project. If none exists yet, start from Unity batch mode and Test Framework commands, then commit a small wrapper so local developers, StemCode, and CI share one validation path."}],[["$","div","EDIT MODE-\"\" -batchmode -projectPath . -runTests -testPlatform EditMode -testResults TestResults/editmode.xml -logFile -",{"className":"doc-command","children":[["$","b",null,{"children":"EDIT MODE"}],["$","code",null,{"children":"\"\" -batchmode -projectPath . -runTests -testPlatform EditMode -testResults TestResults/editmode.xml -logFile -"}]]}],["$","div","PLAY MODE-\"\" -batchmode -projectPath . -runTests -testPlatform PlayMode -testResults TestResults/playmode.xml -logFile -",{"className":"doc-command","children":[["$","b",null,{"children":"PLAY MODE"}],["$","code",null,{"children":"\"\" -batchmode -projectPath . -runTests -testPlatform PlayMode -testResults TestResults/playmode.xml -logFile -"}]]}],["$","div","CI-Use the same Unity build or test wrapper used by CI when available",{"className":"doc-command","children":[["$","b",null,{"children":"CI"}],["$","code",null,{"children":"Use the same Unity build or test wrapper used by CI when available"}]]}]],["$","p",null,{"children":"After C# edits, confirm that Unity imports and recompiles cleanly, then run the smallest relevant Edit Mode or Play Mode tests and exercise the affected scene in the Editor. Build or platform validation should follow the project’s existing automation."}],["$","pre",null,{"children":["$","code",null,{"children":"Run the smallest relevant validation first. If it passes, run the broader project checks and review the final diff."}]}]]}] 1a:["$","section",null,{"id":"memory","className":"docs-section reveal","children":[["$","span",null,{"children":["08"," / PROJECT MEMORY"]}],["$","h2",null,{"children":"Keep longer-lived architecture context alongside your project instructions."}],["$","p",null,{"children":["Use ",["$","code",null,{"children":"AGENTS.md"}]," for concise rules the agent should follow on every task. Keep longer architecture notes, domain context, and workflow references in repository-level StemCode memory so both stay reviewable and versionable."]}],["$","pre",null,{"children":["$","code",null,{"children":"This is a Unity C# project.\nMain gameplay scripts are under Assets/Scripts/.\nUse standard Unity C# conventions.\nPrefer components over large monolithic scripts.\nDo not modify Library/, Temp/, Obj/, Logs/, UserSettings/, or generated build output.\nDo not modify scene or prefab YAML manually unless specifically requested.\nPreserve existing serialized field names unless a rename is intentional.\nCheck for Unity lifecycle implications when changing Awake, Start, Update, FixedUpdate, OnEnable, and OnDisable.\nKeep runtime and Editor-only code separated.\nExplain required Inspector setup after creating or changing a component.\nAvoid introducing packages unless they are necessary.\nUse the project's checked-in Unity CLI wrapper or exact Editor version for automated validation.\nAfter modifying C# code, check for likely Unity compilation errors and run relevant tests."}]}]]}] 1b:["$","section",null,{"id":"review","className":"docs-section reveal","children":[["$","span",null,{"children":["09"," / REVIEW"]}],["$","h2",null,{"children":"Review the change in terms of your stack, not only the generated code."}],["$","p",null,{"children":"Ask StemCode to inspect its own diff and check the integration points that are easiest to miss in a repository-wide change."}],["$","pre",null,{"children":["$","code",null,{"children":"- Unity lifecycle and execution-order regressions\n- lost serialized references or renamed serialized fields\n- runtime versus Editor assembly boundaries\n- per-frame allocations and unnecessary Update work\n- event subscription and cleanup symmetry\n- required Inspector or scene setup\n- Edit Mode or Play Mode test coverage\n- Unity CLI or CI validation results"}]}]]}] 1c:["$","section",null,{"id":"faq","className":"docs-section reveal","children":[["$","span",null,{"children":["10"," / FAQ"]}],["$","h2",null,{"children":"Common setup questions."}],[["$","$1","Does Unity have a command-line workflow?",{"children":[["$","h3",null,{"children":"Does Unity have a command-line workflow?"}],["$","p",null,{"children":"Yes. The Unity Editor executable accepts command-line arguments such as -batchmode, -projectPath, -runTests, -testPlatform, -testResults, and -executeMethod. Use the project’s exact Editor version and preferably wrap the command in a checked-in script."}]]}],["$","$1","Can StemCode control the Unity Editor directly?",{"children":[["$","h3",null,{"children":"Can StemCode control the Unity Editor directly?"}],["$","p",null,{"children":"The normal repository workflow focuses on project files and commands. Direct Editor actions require an appropriate Unity editor integration or MCP tool; keep visual scene and Inspector work in Unity unless such tooling is intentionally connected."}]]}],["$","$1","Should Library be indexed?",{"children":[["$","h3",null,{"children":"Should Library be indexed?"}],["$","p",null,{"children":"Usually no. Library is generated and can be very large. Keep Assets, Packages, and ProjectSettings visible and ignore generated Unity directories."}]]}],["$","$1","Can it edit scenes and prefabs?",{"children":[["$","h3",null,{"children":"Can it edit scenes and prefabs?"}],["$","p",null,{"children":"Unity scenes and many prefabs are serialized text when text serialization is enabled, but they are easy to damage with blind edits. Prefer Editor-driven changes unless the repository already reviews those files as source and the requested change is well scoped."}]]}]]]}] 1d:["$","section",null,{"className":"docs-section reveal","children":[["$","span",null,{"children":"NEXT STEP"}],["$","h2",null,{"children":"Put StemCode to work in a real repository."}],["$","p",null,{"children":"Install StemCode, open the project you already work in, and begin with a repository-understanding task before asking the agent to change code. That gives the model better context and keeps the workflow reviewable."}],["$","div",null,{"className":"docs-grid-2 docs-spaced","children":[["$","div",null,{"className":"docs-feature-card","children":[["$","span",null,{"children":"INSTALL"}],["$","h3",null,{"children":"Start with the CLI."}],["$","pre",null,{"children":["$","code",null,{"children":["npm install -g stemcode","\n","cd your-project","\n","stemcode"]}]}]]}],["$","div",null,{"className":"docs-feature-card","children":[["$","span",null,{"children":"LEARN"}],["$","h3",null,{"children":"Go deeper."}],["$","p",null,{"children":"Read the full StemCode documentation for providers, permissions, LSP integrations, memory, MCP, CI review, and advanced workspace configuration."}],["$","$L6",null,{"className":"inline-arrow","href":"/docs","children":"READ THE DOCS →"}]]}]]}]]}] 23:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","2",{"name":"theme-color","content":"#f4f5f0"}]] 1f:null 27:I[622,[],"IconMark"] 21:{"metadata":[["$","title","0",{"children":"StemCode for Unity Developers: C#, Scenes, Tests, and Project-Aware AI Coding | GrowBitLabs"}],["$","meta","1",{"name":"description","content":"Set up StemCode for Unity projects with C# scripts, Assets, Packages, ProjectSettings, Unity command-line automation, testing, refactoring, and Git review."}],["$","meta","2",{"name":"keywords","content":"StemCode Unity,Unity AI coding agent,Unity C# AI assistant,Unity CLI,Unity command line,Unity batchmode,Unity project AI,Unity refactoring AI,Unity code review AI"}],["$","meta","3",{"name":"robots","content":"index, follow"}],["$","meta","4",{"name":"googlebot","content":"index, follow"}],["$","link","5",{"rel":"canonical","href":"https://growbitlabs.com/guides/stemcode-unity-developers"}],["$","meta","6",{"property":"og:title","content":"StemCode for Unity Developers: C#, Scenes, Tests, and Project-Aware AI Coding"}],["$","meta","7",{"property":"og:description","content":"Set up StemCode for Unity projects with C# scripts, Assets, Packages, ProjectSettings, Unity command-line automation, testing, refactoring, and Git review."}],["$","meta","8",{"property":"og:url","content":"https://growbitlabs.com/guides/stemcode-unity-developers"}],["$","meta","9",{"property":"og:type","content":"article"}],["$","meta","10",{"property":"article:published_time","content":"2026-10-01"}],["$","meta","11",{"name":"twitter:card","content":"summary_large_image"}],["$","meta","12",{"name":"twitter:title","content":"StemCode for Unity Developers: C#, Scenes, Tests, and Project-Aware AI Coding"}],["$","meta","13",{"name":"twitter:description","content":"Set up StemCode for Unity projects with C# scripts, Assets, Packages, ProjectSettings, Unity command-line automation, testing, refactoring, and Git review."}],["$","link","14",{"rel":"icon","href":"/assets/fav.png","sizes":"196x186","type":"image/png"}],["$","link","15",{"rel":"apple-touch-icon","href":"/assets/fav.png","sizes":"196x186","type":"image/png"}],["$","$L27","16",{}]],"error":null,"digest":"$undefined"} 26:"$21:metadata"