首页 > 代码库 > unity4升级unity5动画文件不能正常播放解决方法

unity4升级unity5动画文件不能正常播放解决方法

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;
}
}
}

unity4升级unity5动画文件不能正常播放解决方法