码迷,mamicode.com
首页 > 编程语言 > 详细

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

时间:2016-12-10 16:07:16      阅读:261      评论:0      收藏:0      [点我收藏+]

标签: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;
}
}
}

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

标签:name   collect   mon   using   children   load   解决方法   tab   void   

原文地址:http://www.cnblogs.com/ZeroMurder/p/6155715.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!