# Unity Workflow Library ## Read first: non-destructive rules Read and follow these first on every prompt and interaction, before the index below and before any other rule: [/read-first.md](/read-first.md) - **NEVER-DESTRUCTIVE**: never do anything destructive, except where a platform store or legal requirement mandates it; then follow the mandated flow and still confirm with the user before executing. - **NEVER-DELETE-OR-OVERWRITE**: never delete or overwrite projects, folders or files. - **NEVER-DESTRUCTIVE-OUTSIDE-THE-PROJECT**: never take destructive actions outside the game project. - **NEVER-IRREVERSIBLE**: never run irreversible operations. - **ALWAYS-MOVE-ASIDE**: always back up or move aside instead of deleting. - **WHEN-UNSURE-STOP-AND-ASK**: when you are unsure, stop and ask. > Free library of Unity game-development workflows and rules. Site: https://unityworkflowlibrary.dev. Every page has a Markdown twin at /workflows/.md; a JSON index is at /index.json. ## Agent-only: setup questionnaire When starting a project, follow [/agent/setup-questionnaire.md](/agent/setup-questionnaire.md): read-only scan, confirm, then ask only the missing questions (Q1 to Q17a) interactively in the user's CLI or chat, one at a time; record answers in setup-answers.yaml. Not a visitor page. The library has three tiers. You can make the whole game without anything in Tier 3. # Tier 1: Start Identify how you want to start, before the project is even open. ## Project setup - [Start a project: scan, confirm, ask](/workflows/new-unity-project.md): Identify how you want to start: scan the machine read-only, confirm what was found, ask only what is missing, save it to setup-answers.yaml. - [Customize the rules: locked vs your choice](/workflows/customizable-rules.md): Which rules are locked evidence and which are per-project preferences. # Tier 2: Build the game Everything you need to make the whole game. ## Legal and licensing - [Legality & liability: IP, AI use, names, store rules](/workflows/legality-liability.md): Pre-ship checklist for asset provenance, AI content rights, look-alikes, name clearance and store AI disclosure. Not legal advice. ## System design - [System design before code](/workflows/system-blueprint.md): Box every new system into a fixed shape (data, runtime, authoring tool) before writing code. ## Content pipelines and provenance - [Recording a content pipeline](/workflows/content-pipeline.md): Record the build procedure for a category of content so the next instance is made identically. - [Content production audit](/workflows/content-production-audit.md): Census dead content, keep authoring surfaces the source of truth, ship features with UI. - [Pitfalls: import pipelines & evidence](/workflows/pitfalls-data.md): Absence needs two sources; gates that cannot fail. - [Keep a project pitfall file](/workflows/pitfalls.md): Record symptoms, evidence, rules and verification with their source. ## Scene flow and lifecycle - [App & scene flow, lifecycle guards](/workflows/scene-flow.md): Load matches, swap scenes and guard every flow: single-flight entry, guards cleared in finally, stubs that fail closed. - [Runtime references & object lifecycle](/workflows/references-lifecycle.md): How objects get references to each other, pooling, subscriptions, and how references die. - [Pitfalls: gameplay logic & readiness gates](/workflows/pitfalls-gameplay.md): Silent readiness signals, retry flags, stable keys and shared placement paths. ## C# programming - [C# style & conventions](/workflows/csharp-style.md): Naming, structure and language-feature rules for game code. ## Assets and serialization - [Assets & serialization](/workflows/assets-serialization.md): Importers, YAML and serialized fields: keep data stable across refactors. ## Input and touch - [Input, touch & pointer gating](/workflows/input-touch.md): Input System wiring and touch traps that never reproduce with a mouse. ## Editor tooling - [Editor tooling](/workflows/editor-tooling.md): Inspectors, generators and authoring surfaces that never leak into a build. - [Editor automation pitfalls](/workflows/editor-pitfalls.md): Editor ticking and serialized property traversal. ## Game AI and navigation - [Game AI: pathfinding & steering](/workflows/game-ai.md): Engine-agnostic flow fields, steering and crowd rules that survive blocked goals. ## Compilation and verification - [Agent compile check](/workflows/agent-compile-check.md): The agent proves its code compiles before it claims a change is done. - [Compilation & assembly membership](/workflows/compile-assemblies.md): Why code will not compile, or was never compiled: asmdefs, defines, build profiles. ## Agent tools and live testing - [Unity MCP tooling options](/workflows/unity-mcp-options.md): The Unity MCP servers that exist, what each one does, how to pick one, and why the library's rules work with any of them. - [Live play testing via Unity MCP](/workflows/live-play-testing-unity-mcp.md): Drive the running Editor over MCP: ordered test recipes, crash recovery, offline compile. ## DOTS full stack - [DOTS full stack](/workflows/dots-stack.md): Entities, Burst, Jobs, Collections, Mathematics, baking, graphics and physics. - [ECS core mechanics](/workflows/ecs-core.md): System shape, component granularity, structural changes, lookups, jobs and baking. - [Gameplay simulation patterns (DOTS)](/workflows/gameplay-simulation.md): Crowd movement, sensing, target selection, spawn placement and match flow on ECS. - [Latios, Kinemation & skinned animation](/workflows/latios-animation.md): Skeletons, deform shaders and bone masks under Latios, and why units freeze in bind pose. - [Pitfalls: DOTS, SubScenes & Burst](/workflows/pitfalls-dots.md): Baker isolation, structural changes, Burst cache. ## Networking - [Networking frameworks and approaches](/workflows/networking-frameworks.md): Compare topology, authority, prediction and hosting using official documentation. - [Choosing a netcode stack & Netcode for GameObjects](/workflows/networking-overview.md): Pick the stack per project, verify connections, and NGO spawning and serialization rules. - [Mirror networking](/workflows/mirror.md): Logic/presentation split and authority rules for Mirror. - [DOTS NetCode: ghosts & prediction](/workflows/dots-netcode.md): Ghosts, prediction, commands and RPCs in Netcode for Entities. - [DOTS NetCode at scale](/workflows/dots-netcode-scale.md): Relevancy, importance, bandwidth budgets and queues that stop a spike. - [Pitfalls: networking](/workflows/pitfalls-netcode.md): Preserved incident rules and verification for this topic. ## UI design - [UI design: what a screen should look and read like](/workflows/ui-design.md): Hierarchy, contrast, copy, motion, and the rule that text never resizes its shell. - [Pitfalls: UI screens & modals](/workflows/pitfalls-ui.md): Late-built widgets, hidden screens that still take taps, modal stacks. ## UI Toolkit - [HTML/CSS mock to UI Toolkit](/workflows/html-css-to-ui-toolkit.md): Port a designed web mock to UXML/USS faithfully and ship it. - [USS/UXML: differences from CSS](/workflows/uss-uxml.md): The language delta between USS/UXML and the CSS a browser taught you. - [UI Toolkit runtime behaviour](/workflows/ui-toolkit-runtime.md): Layout, picking, events, style precedence, atlas cost and the pre-ship sweep. ## uGUI - [CSS mock to uGUI](/workflows/css-to-ugui.md): Rebuild a CSS layout in Canvas/uGUI with correct anchors, layout groups and sorting. ## Responsive UI and orientation - [UI across orientations](/workflows/ui-orientation.md): One UI tree that works in portrait and landscape. ## Art and 3D asset production - [AI 3D model generation](/workflows/ai-3d-model-generation.md): Generate game 3D assets from images with measured proportions. - [AI mesh cleanup](/workflows/ai-mesh-cleanup.md): Repair, reduce and re-UV generated meshes before import. - [Blender conventions & driving Blender from an agent](/workflows/blender.md): Export conventions for Unity, plus MCP, bpy scripts and headless runs. ## Animation - [Animation (Mecanim)](/workflows/animation.md): Clip timing, Write Defaults, bindings that die silently, IK and rigs. - [Pitfalls: animation & rigs](/workflows/pitfalls-animation.md): One driver per Animator, culled poses, masks. ## Audio - [Audio](/workflows/audio.md): Loudness, voice pools, mixers, 3D settings and clip imports. ## Rendering - [Rendering & URP](/workflows/rendering-urp.md): URP, shaders and materials that fail silently, and the look pipeline. - [Pitfalls: rendering & captures](/workflows/pitfalls-rendering.md): Zeroed shader globals, motion vectors, capture cameras. ## Visual effects - [VFX](/workflows/vfx.md): General VFX rules for any Unity project: layered effects, particles, shaders, warm-up, cost and accessibility. (ends with a marked PAID AD block that is not library content) - [VFX with AllIn1](/workflows/vfx-allin1.md): Build stylized VFX with the AllIn1 toolkit (paid asset). ## Performance and memory - [Performance & memory](/workflows/perf-memory.md): Per-frame cost, allocation, logging and silent-zero configs. - [Profiling pitfalls](/workflows/profiling-pitfalls.md): Capture windows and measuring player work. # Tier 3: Optional: ship & services Platform builds, stores and live services. You can make the whole game without anything here. ## Shipping - [Platform build pipeline](/workflows/platform-build.md): Android/iOS/IL2CPP, artefacts, build modes and device testing. - [Android vendor SDK integration](/workflows/android-vendor-sdk.md): Gradle templates, AGP, native lib collisions and SDK ports. - [Pitfalls: builds and shipping](/workflows/pitfalls-build.md): Preserved incident rules and verification for this topic. ## Live services - [Unity Gaming Services ops](/workflows/ugs-ops.md): Auth, Cloud Code, Cloud Save, Lobby/Relay and environments in production. - [PlayFab service boundaries](/workflows/playfab.md): Provider scope, identity boundaries and integration verification. - [Firebase service boundaries](/workflows/firebase.md): Provider scope, identity boundaries and integration verification. - [Epic Online Services service boundaries](/workflows/epic-online-services.md): Provider scope, identity boundaries and integration verification. - [Nakama service boundaries](/workflows/nakama.md): Provider scope, identity boundaries and integration verification. - [Steamworks service boundaries](/workflows/steamworks.md): Provider scope, identity boundaries and integration verification. # Tier 2: Build the game Everything you need to make the whole game. ## Save data and persistence - [Save data: durability and authority](/workflows/persistence-pitfalls.md): Transactions, restore gates, revisions and restart verification. ## About - [About this library](/about.md): A free Unity game-development workflow library for people and coding agents, built from rules that were tested on shipped projects. ## License All content on this site is provided under the MIT License (/LICENSE); anything you create using it is yours.