Unity QA guide

How to find missing scripts in Unity prefabs before they become runtime problems.

A missing MonoBehaviour reference can hide inside a prefab for weeks and only surface when somebody opens the right scene, variant or nested object. The safest approach is to treat missing-script detection as part of asset QA, not as a last-minute cleanup task.

1. Why missing scripts are easy to miss

Unity can keep serialized component slots even after a script is deleted, renamed, moved to an unavailable assembly or otherwise becomes unresolved. The prefab may still exist and render normally while the broken component reference remains hidden in the hierarchy.

2. Start with the prefabs that actually matter

Prioritize prefabs used in production scenes, addressable groups, player-facing content and reusable asset packs. Scan high-impact content first instead of manually clicking every object in the project.

3. Check nested prefabs and variants

A clean parent prefab does not guarantee that nested children or variants are clean. Inspect the hierarchy all the way down, especially when a project has evolved through script renames or package changes.

4. Do not auto-delete unknown components

A missing script can represent lost behavior, not harmless clutter. Before removing anything, identify whether the component belonged to gameplay logic, editor tooling, a third-party package or a migration that still needs to happen.

5. Make the result reviewable

For team handoff, a CSV or written report is more useful than a one-time console dump. Record which prefab triggered the issue, where it lives and what should happen next.

Free tool

Scan for missing scripts without modifying the project

The free Unity Asset Preflight Auditor reports missing MonoBehaviour references together with other common model, texture and prefab QA findings, then exports the result to CSV.

Open the free Unity Asset Preflight Auditor →