标签:name collect mon using children load 解决方法 tab void
using UnityEngine;
using System.Collections;
using UnityEditor;
public class ZYResetTheAnimator : MonoBehaviour {
[MenuItem("ZY/ResetTheAnimator")]
static void delete()
{
GameObject prefab = AssetDatabase.LoadAssetAtPath<GameObject>("Assets/MWSlideControl.prefab");
//重置动画组件的参数
Animator[] M_Animtor = prefab.GetComponentsInChildren<Animator>(true);
foreach (Animator AnimChild in M_Animtor)
{
Debug.Log("组件的名字:" + AnimChild.name);
AnimChild.applyRootMotion = false;
}
}
}
标签:name collect mon using children load 解决方法 tab void
原文地址:http://www.cnblogs.com/ZeroMurder/p/6155715.html