Answers for "How to change animation clips of an animator state at runtime"

C#
0

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);
    }
Posted by: Guest on October-14-2021

Code answers related to "How to change animation clips of an animator state at runtime"

C# Answers by Framework

Browse Popular Code Answers by Language