【unity3d study ---- 麦子学院】---------- unity3d常用组件及分析 ---------- Legacy动画系统

Legacy是旧的版本的动画系统

unity引擎对Legacy动画系统做了优化

所以能使用Legacy系统就用

代码:

 1 using UnityEngine;
 2 using System.Collections;
 3 
 4 public class AnimationTest : MonoBehaviour {
 5 
 6     Animation animation;
 7 
 8     // Use this for initialization
 9     void Start () {
10     
11         animation = GetComponent<Animation> ();  // 获取 Animation组件
12 
13     }
14     
15     // Update is called once per frame
16     void Update () {
17     
18         animation.Play ("walk"); // 播放动画 , 动画名称
19 
20     }
21 }
原文地址:https://www.cnblogs.com/dudu580231/p/5972507.html