Prefab Drift Audit

intermediate feature

Editor Doctor Pro · Features

Prefab 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

IdSeverityWhat it detects
EDP-DRIFT-001 OverrideSprawlWarnAn instance carries more property overrides than the configurable threshold (default 8).
EDP-DRIFT-002 RedundantPropertyOverrideWarnAn override matches the source value - i.e. the override is a no-op and can be cleared.
EDP-DRIFT-003 AddedComponentOnInstanceWarnA component exists on the instance that is not on the source prefab.
EDP-DRIFT-004 RemovedComponentOnInstanceWarnA component on the source prefab is removed on the instance.
EDP-DRIFT-005 AddedGameObjectOnInstanceWarnA child GameObject exists on the instance but not on the source.
EDP-DRIFT-006 RemovedGameObjectOnInstanceWarnA child GameObject from the source prefab is removed on the instance.
EDP-DRIFT-007 VariantChainTooDeepWarnVariant chain exceeds the configurable depth (default 3 levels).
EDP-DRIFT-008 VariantChainBrokenErrorA variant prefab references a missing source. Often a cleanup leftover.
EDP-DRIFT-009 DriftClusterInfoMultiple 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.

Tip: Run Prefab Drift after a refactor pass. Renaming a script or restructuring a prefab tree often leaves drift artifacts - DRIFT-002 and DRIFT-008 catch the obvious ones in seconds.
Was this page helpful?