首页 > 编程语言 > 详细

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

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

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动画文件不能正常播放解决方法

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!