Why does Animator rebind cost ~4ms the first frame after an additive scene load?
Unity 2022.3.21f1, IL2CPP, mid-tier Android. We load a combat arena additively while gameplay is already running. The load itself is fine — spread across frames, no spike. But the first frame after allowSceneActivation flips, the profiler shows a 4.1ms block under Animator.Rebind even though nothing in the new scene has an Animator enabled yet.
What I have tried:
- Disabling every Animator in the additive scene before build. Spike drops to 3.6ms — so it is mostly not the new ones.
Animator.keepAnimatorStateOnDisable = trueon the existing player rig. No change.- Moving the avatar mask work to a preload scene. No change.
My current theory is that activating the scene dirties the global transform hierarchy and every existing Animator revalidates its binding cache, so the cost scales with what is already in the scene, not what is arriving. That would match the numbers: the spike grows with the number of live rigs.
Has anyone confirmed this, and is there a way to defer the revalidation to a frame of my choosing? Deep profile on device is too distorting to be conclusive here.
Written by
Priya Raman
Gameplay engineer, seven years in Unity. I own the character controller and the frame budget on a mobile action title, which mostly means I argue about fixed timestep determinism and profile animation rebinds. Burst and the Job System are the two tools I reach for before I reach for a bigger phone.
4 Comments
Sign in to join the discussion
Not a Unity person, but the shape of it — cost appears on activation, scales with what is already resident — reads like an invalidation sweep rather than a load cost. Can you bisect it by activating an empty additive scene? If an empty scene still costs 3ms, the content arriving is irrelevant and you have your answer.