Skip to content

Unity checklist

Copy this list into a pull request, design review or project kickoff and tick what applies. Rules are grouped by level and sorted by score (criteria). Each links to the file that explains it and cites its sources. Automatable names tools that can check the rule in CI (see the file's "How to enforce" section).

Also apply the general checklist.

This file is generated by python3 scripts/rank.py fix from the guidelines. Don't edit it by hand.

  • UNITY-CODE-1 (8) Keep logic that doesn't need the engine in plain C# classes, with MonoBehaviours as thin adapters. (specific/unity/code-architecture)
  • UNITY-CODE-6 (8) Don't use ScriptableObjects as save-game storage. (specific/unity/code-architecture)
  • UNITY-CODE-8 (8) Make dependencies explicit through serialized references, constructor or method injection, or a DI container (for example VContainer), rather than singletons and scene-wide Find lookups everywhere. (specific/unity/code-architecture)
  • UNITY-CODE-9 (8) Don't rely on the order in which Unity calls the same event function (Awake, Start, …) on different objects. (specific/unity/code-architecture)
  • UNITY-PERF-1 (8) Profile with the Unity Profiler connected to a build running on the target device, early and before and after every optimisation, not only in the Editor. (specific/unity/content-and-performance) Automatable: Unity Performance Testing package.
  • UNITY-PERF-2 (8) Pair every Addressables load with a release. (specific/unity/content-and-performance)
  • UNITY-PERF-3 (8) Avoid managed allocations in per-frame code paths to prevent garbage-collector spikes. (specific/unity/content-and-performance) Automatable: Microsoft.Unity.Analyzers, Unity Project Auditor, Code view.
  • UNITY-TEST-1 (8) Inject dependencies into the plain C# classes that hold the logic, so that Edit Mode tests can substitute fakes. (specific/unity/testing)
  • UNITY-CODE-2 (7) Separate UI from game logic with Model-View-Presenter (or MVC). (specific/unity/code-architecture)
  • UNITY-CODE-5 (7) Put designer-tunable, shared data in ScriptableObject assets, not hard-coded values or copies on every prefab. (specific/unity/code-architecture)
  • UNITY-CODE-10 (7) Decouple systems with events. (specific/unity/code-architecture)
  • UNITY-PERF-4 (7) Keep the Resources folder for prototypes and small bootstrap data. Load game content through Addressables (or AssetBundles). (specific/unity/content-and-performance)
  • UNITY-PERF-6 (7) Localize with the Unity Localization package: keep text in String Tables, make entries that insert values or counts Smart Strings, which take named placeholders and choose plural forms by the CLDR rules, and swap language-specific textures, audio and other assets through Asset Tables. (specific/unity/content-and-performance)
  • UNITY-STRUCT-1 (7) Agree on one folder structure and naming convention, write it down, and keep your own assets separate from third-party assets. (specific/unity/project-structure)
  • UNITY-STRUCT-4 (7) Split code into assemblies with Assembly Definition files once the project grows. (specific/unity/project-structure) Automatable: Unity compiler with assembly definitions.
  • UNITY-STRUCT-5 (7) Mirror the architecture in assemblies, for example Game.Core (no engine-specific dependencies where practical), Game.Gameplay, Game.UI, Game.Editor and *.Tests, so that wrong-way references fail to compile. (specific/unity/project-structure) Automatable: Unity compiler with assembly definitions.
  • UNITY-GFX-2 (7) In URP and HDRP, follow Unity's draw-call recommendations: enable the SRP Batcher and the GPU Resident Drawer, turn off static batching and the materials' Enable GPU Instancing checkbox, share materials, and use Material Variants rather than MaterialPropertyBlock for objects that differ only in property values. (specific/unity/rendering)
  • UNITY-GFX-3 (7) Write custom shaders in Shader Graph by default, bring in hand-written HLSL through Custom Function nodes, and keep any fully hand-written URP or HDRP shader compatible with the SRP Batcher. (specific/unity/rendering) Automatable: Unity Project Auditor, Shaders view.
  • UNITY-GFX-4 (7) Declare keywords that only materials set with shader_feature_local (in Shader Graph, keep the keyword's default Shader Feature definition), keep multi_compile for branches that C# switches at run time, and use dynamic_branch for simple, balanced branches on fast GPUs. (specific/unity/rendering) Automatable: Unity Project Auditor, Shaders view.
  • UNITY-GFX-5 (7) Strip the shader variants the build doesn't need, and check the count after every build: turn on Strip Unused Variants and Strip Unused Post Processing Variants in the URP Graphics settings, turn off unused features in every URP asset the build includes, remove keywords in Shader Build Settings (Unity 6.3 LTS and later), and strip the rest with IPreprocessShaders. (specific/unity/rendering) Automatable: Unity build log, shader variant counts, Unity Project Auditor, Shaders view.
  • UNITY-GFX-6 (7) On DirectX 12, Vulkan and Metal, record the pipeline state objects (PSOs) the game uses into a GraphicsStateCollection from a development build, one collection per graphics API and platform, ship the collections, and warm them up during loading screens with WarmUp or WarmUpProgressively. (specific/unity/rendering)
  • UNITY-GFX-7 (7) Set texture import settings for each platform in the platform overrides: ASTC on mobile, XR and the web, BC7, DXT or BC6H on desktop, the lowest Max Size that looks acceptable, and Read/Write off. Apply them through presets, so that new imports get them automatically. (specific/unity/rendering)
  • UNITY-TEST-2 (7) Run the tests from the command line in batch mode as part of the build, so CI runs them on every change. (specific/unity/testing) Automatable: GameCI Unity Test Runner.
  • UNITY-TEST-3 (7) Write plain NUnit [Test] tests in Edit Mode for logic that doesn't need Play mode, and use [UnityTest] Play Mode tests for runtime behaviour that spans frames or needs a scene. (specific/unity/testing)
  • UNITY-TEST-4 (7) Put tests in their own test assemblies that reference the assemblies under test. (specific/unity/testing)
  • UNITY-CODE-11 (6) For asynchronous code, use Awaitable with async/await (Unity 2023.1+) or coroutines, and know which thread each continuation runs on. (specific/unity/code-architecture)
  • UNITY-CODE-15 (6) For screen reader support, build an accessibility hierarchy with Unity's Accessibility module: an AccessibilityNode with a label, role and state for each element that players read or use, set as AssistiveSupport.activeHierarchy while that UI is shown, and kept in sync with the UI, including each node's screen position, in your own code. (specific/unity/code-architecture)
  • UNITY-PERF-5 (6) Pool objects that are created and destroyed often, such as projectiles, effects and UI list items, using UnityEngine.Pool. (specific/unity/content-and-performance)
  • UNITY-STRUCT-2 (6) Know Unity's reserved folder names (Editor, Resources, StreamingAssets, Plugins, …) and use them only for their purpose. (specific/unity/project-structure)
  • UNITY-STRUCT-3 (6) Agree on a team C# style guide, starting from Unity's example and adapting it. Apply it consistently, and enforce formatting with an EditorConfig file. (specific/unity/project-structure) Automatable: dotnet format.
  • UNITY-STRUCT-9 (6) Configure UnityYAMLMerge (Smart Merge) as the merge tool for scenes and prefabs. (specific/unity/project-structure)
  • UNITY-GFX-8 (6) Give meshes that are seen at varying distances levels of detail: generate Mesh LODs on import (Unity 6.2 and later) to cut triangles at little memory cost, and use LOD Groups where a lower level must also cut materials or draw calls, or needs explicit transition sizes. (specific/unity/rendering)
  • UNITY-GFX-9 (6) Inspect batching in the Frame Debugger and GPU cost in the Rendering Debugger, both of which can also inspect a built player. (specific/unity/rendering)

Conditional (1–5)