pub struct AnimatorOverrideController {
pub m_Clips: Vec<AnimationClipOverride>,
pub m_Controller: PPtr,
pub m_Name: String,
}Expand description
AnimatorOverrideController is a class of the Unity engine since version 4.3.0. Exert from Unity’s scripting documentation: Interface to control Animator Override Controller. Animator Override Controller is used to override Animation Clips from a controller to specialize animations for a given Avatar. Swapping Animator.runtimeAnimatorController with an AnimatorOverrideController based on the same AnimatorController at runtime doesn’t reset state machine’s current state.There are three ways to use the Animator Override Controller.
- Create an Animator Override Controller in the Editor.
- Change one Animation Clip per frame at runtime (Basic use case). In this case the indexer operator AnimatorOverrideController.this[string] could be used, but be careful as each call will trigger a reallocation of the animator’s clip bindings.
- Changing many Animation Clips per frame at runtime (Advanced use case).
The AnimatorOverrideController.ApplyOverrides method is well suited for this case as it reduce the number of animator’s clips bindings reallocation to only one per call.
Fields§
§m_Clips: Vec<AnimationClipOverride>§m_Controller: PPtrPPtr<RuntimeAnimatorController>: (4.3.0 - 2022.3.2f1)
m_Name: StringThe name of the object.