Build Review
intermediate featureBuild Review
The Build Review module audits the project's Build Settings scene list. Five focused checks catch the things that break shipped builds: orphan paths, missing files, duplicates, disabled-but-loaded scenes, and path traversal. Four of the five ship with safe auto-fixes.
BuildHygiene*; the user-facing label is Build Review. You may see both in code comments and stack traces.
Checks
| Id | Severity | Auto-fix? | What it detects |
|---|---|---|---|
EDP-BUILD-001 OrphanScene | Error | Yes | An entry in Scenes In Build whose guid resolves to a scene that has been deleted from the project. |
EDP-BUILD-002 MissingOnDisk | Error | Yes | An entry whose guid does not resolve and whose path also does not exist on disk. |
EDP-BUILD-003 DuplicateScene | Warn | Yes | The same scene appears more than once in the list - one entry shadows the other depending on whether they're enabled. |
EDP-BUILD-004 DisabledButLoaded | Warn | Manual | A scene is disabled in Build Settings but still loaded by code (referenced from a SceneAsset field under Resources/, an Addressable, or a manual SceneManager.LoadScene). |
EDP-BUILD-005 PathTraversal | Error | Yes | An entry path contains .. or escapes the project's Assets/ root. |
Why this module exists
Build Settings is one of the few project surfaces that has no Inspector-level validation. A scene gets renamed, the Build Settings entry stays pointing at the old path. A scene gets deleted, the entry stays orphan. A team member adds the same scene twice during a merge. None of those break the editor; all of them break the build, often hours into a long CI cut.
Build Review catches them on demand and reverts the issue with a single click. The auto-fixes operate on a whole-array snapshot of EditorBuildSettings.scenes, so reverting from Action History restores the exact state before the fix - even when a single fix removes multiple entries.
Auto-fix details
| Fix | What it does |
|---|---|
| RemoveOrphanFix (BUILD-001) | Removes the orphan entry from the list. |
| RemoveMissingOnDiskFix (BUILD-002) | Removes the entry whose path doesn't resolve. |
| DedupeBuildScenesFix (BUILD-003) | Removes duplicate entries, preserving the first occurrence's enabled state. |
| NormalizePathFix (BUILD-005) | Rewrites the entry's path to its normalised form, dropping .. traversal. |
BUILD-004 (disabled-but-loaded) is Manual: the right resolution depends on intent - re-enable the scene, remove the loader, or convert to an Addressable. The check description points you at the loader site.
Apply All Auto Fixes
Use the Apply All Auto Fixes button at the top of the Build Review tab to batch-fix every auto finding in one operation. The confirmation dialog lists every change before it runs; revert the whole batch from Action History via the snapshot helper.
--module build-review --fail-on error exits non-zero on any unresolved orphan / missing / traversal finding, blocking the build before the platform-specific compile starts.
Suggest an improvement
Help us improve this documentation page.