动态更换animator的animatorcontroller
你可以这样
Animator animator = this.gameObject.GetComponent<Animator>(); animator.runtimeAnimatorController = Resources.Load("path_to_your_controller") as RuntimeAnimatorController;
也可以这样
public RuntimeAnimatorController anim2; this.GetComponent().runtimeAnimatorController = anim2 as RuntimeAnimatorController;

浙公网安备 33010602011771号