How to change animation clips of an animator state at runtime
protected Animator animator;
protected AnimatorOverrideController animatorOverrideController;
public void Start()
{
animator = GetComponent<Animator>();
animatorOverrideController = new AnimatorOverrideController(animator.runtimeAnimatorController);
animator.runtimeAnimatorController = animatorOverrideController;
}
public void Update()
{
animatorOverrideController.ApplyOverrides(clipOverrides);
}