Quick answer: Unity Animator.Rebind() resets your AnimatorOverrideController’s runtime clip swaps? Rebind reloads from the source RuntimeAnimatorController — runtime overrides are lost.
After enabling a character with runtime-replaced clips, a hot reload calls Rebind and all swap clips revert. The override controller is back to defaults.
What Rebind Does
Rebind reinitializes the Animator’s internal state machine from the source controller. Resets state, fully rebuilds bindings. Runtime override controllers re-load their base clips.
Re-Apply After Rebind
animator.Rebind();
animator.runtimeAnimatorController = overrideController;
overrideController["Idle"] = customIdle;After Rebind, re-assign the override controller and re-set runtime clip overrides.
Avoid Rebind If Possible
Reasons for Rebind: model swap, parameter list change. For just clip swap, just set the new clip via the override controller indexer — no Rebind needed.
OnEnable Pitfall
If your code calls Rebind in OnEnable, runtime overrides set in Awake will be wiped each time the GameObject reactivates. Move override setup to a later phase.
Verifying
Runtime clip swaps persist across enable/disable cycles. Rebind followed by re-apply gives the same result.
“Rebind reloads the source. Re-apply runtime overrides after the call.”
Wrap Rebind in a helper that saves and restores overrides — surface the cost so callers think twice before calling.