Using RefSafe Pro

Fixing issues

Built-in fixers

RefSafe Pro ships automatic fixes for the issue types where the correct action is unambiguous:

Issue typeWhat the fix does
MissingScriptRemoves the missing component from the GameObject
MissingReferenceClears the dangling serialized reference, or replaces it with a chosen asset
DuplicateComponentRemoves the duplicate, keeping the first instance
MissingPrefabReconnects or unpacks the disconnected prefab instance
DeletedBuildSceneRemoves the missing scene entry from Build Settings

Rows with an available fix show a Fix button. Rows without one need a human decision — RefSafe deliberately doesn’t guess where guessing could destroy work.

Smart replacement suggestions

Clearing a broken reference removes the breakage but not the underlying loss: the field was supposed to point at something.

For MissingReference issues, the Replace with… dropdown proposes candidate assets ranked by relevance, so you can restore the intended assignment rather than blanking the field. This is most useful after a folder reorganization that broke many references to assets that still exist under new paths.

The top three candidates show in the dropdown. Studios can supply their own ranking by implementing IFixSuggestionProvider — see extending RefSafe Pro.

Batch fixing

Fix Selected — multi-select rows and fix them in one action.

Fix All — applies every available automatic fix in the current result set. Respects active filters, so you can scope it: filter to DuplicateComponent, then Fix All, and only duplicate components are touched.

Filter before using Fix All. Running it against an unfiltered first-pass result set on a large project applies a lot of changes at once, and while every one is undoable, reviewing them afterwards is harder than scoping up front.

Undo

Every fix is wrapped in a Unity Undo group. Ctrl/Cmd + Z reverts it, including batch fixes, which register as a single undoable operation.

This applies to custom fixers too, provided they use Undo.RecordObject / Undo.DestroyObjectImmediate as the built-in ones do.

When a fix doesn’t stick

A fixer returns success only when the underlying problem is genuinely resolved. If an issue stays in the list after a fix, the fixer reported failure — usually because the object couldn’t be resolved from its instance ID, which happens when the scene has changed since the scan.

Re-scan and try again. If it persists, the Unity console carries the detail.

Fix ordering with custom fixers

Multiple fixers can claim the same issue type. Order decides which wins:

  • Built-in fixers run at order 0.
  • A negative order supersedes the built-in fixer for issues your CanFix accepts.
  • A positive order runs after built-ins, as a fallback.

See IIssueFixer and IssueFixerAttribute for the contract.