更新时间:2023-01-05 10:25:27
首先将 Animator
组件附加到该 GameObject
,例如
First attach an Animator
component to that GameObject
like
声明一个 Animator
通过 GetComponent
将 RuntimeAnimatorController
分配给其 runtimeAnimatorController
属性。
像
Animator PLAnimator;
void Start ()
{
PLAnimator = GetComponent<Animator> ();
PLAnimator.runtimeAnimatorController = Resources.Load ("Assets/Resources/System/PLController") as RuntimeAnimatorController;
}