Prefab Drift Audit
intermediate featurePrefab Drift Audit
The Prefab Drift module audits how instances of a shared prefab have diverged from their source: how many overrides, how deep the variant chain, whether the chain is broken, and whether instances cluster around a common deviation that suggests the prefab itself should change.
Checks
| Id | Severity | What it detects |
|---|---|---|
EDP-DRIFT-001 OverrideSprawl | Warn | An instance carries more property overrides than the configurable threshold (default 8). |
EDP-DRIFT-002 RedundantPropertyOverride | Warn | An override matches the source value - i.e. the override is a no-op and can be cleared. |
EDP-DRIFT-003 AddedComponentOnInstance | Warn | A component exists on the instance that is not on the source prefab. |
EDP-DRIFT-004 RemovedComponentOnInstance | Warn | A component on the source prefab is removed on the instance. |
EDP-DRIFT-005 AddedGameObjectOnInstance | Warn | A child GameObject exists on the instance but not on the source. |
EDP-DRIFT-006 RemovedGameObjectOnInstance | Warn | A child GameObject from the source prefab is removed on the instance. |
EDP-DRIFT-007 VariantChainTooDeep | Warn | Variant chain exceeds the configurable depth (default 3 levels). |
EDP-DRIFT-008 VariantChainBroken | Error | A variant prefab references a missing source. Often a cleanup leftover. |
EDP-DRIFT-009 DriftCluster | Info | Multiple instances share the same override; the source prefab probably wants the change applied. |
Auto-fix
Three rules are auto tier:
- DRIFT-001 / OverrideSprawl - no auto-fix; surfaces only.
- DRIFT-002 / RedundantPropertyOverride - the redundant override clears.
- DRIFT-003 / AddedComponentOnInstance - the added component reverts.
- DRIFT-005 / AddedGameObjectOnInstance - the added GameObject reverts.
Every other DRIFT rule is Manual: the safe fix direction depends on your intent (apply the override to the source, revert it on the instance, or accept it).
Bulk actions
Right-click any selection in the Drift tab to access:
- Apply to source - applies every selected override to the source prefab in one operation. The source prefab now matches the instance.
- Revert on instance - reverts every selected override; the instance now matches the source.
- Break prefab link - unpacks the instance from its source prefab. Use sparingly; the instance becomes a regular GameObject hierarchy.
- Mark as acceptable - registers a per-issue suppression with author / date / reason. The override stays but EDP no longer surfaces it.
Drift clusters
The EDP-DRIFT-009 rule looks across all instances of a prefab in the project (scenes plus other prefabs that nest it) and groups overrides that recur. When the same property is overridden the same way on a majority of instances, the rule emits an Info finding suggesting that the source prefab should adopt that value. Click Apply to source on any instance in the cluster to propagate the change.
Reversibility
Every drift action is journaled in the Action History and can be reverted from there. Bulk operations land as a single Action History entry so the whole batch reverts as one.
Suggest an improvement
Help us improve this documentation page.