发布时间:2019-09-05 07:06:33编辑:auto阅读(2370)
1、如图模型1是已经做好的文件,模型2是还没动画效果的模型
2、添加角色动画属性组件
3、代码控制动画播
using UnityEngine;
using System.Collections;
public class NewBehaviourScript : MonoBehaviour {
private Animation animation;//动画
// Use this for initialization
void Start () {
//取得游戏对象动画组件
animation = GetComponent<Animation>();
}
// Update is called once per frame
void Update () {
//播放行走动画
animation.Play ("Run");
//站立 play播放分别对应Animations中Element0和Element1中的动画名
//animation.Play ("Idle");
}
}以上就是Unity 3D控制角色动画的基本操作教程,附上demo
下载地址:http://www.kuaipan.cn/file/id_141868194330584496.htm?source=1
上一篇: php-eclipse集成配置(Ecli
下一篇: Workerman3.x 版本学习之入门
51955
51750
42046
38885
33377
30342
28986
24002
23917
22276
460°
2634°
3328°
2756°
2740°
3510°
2702°
3533°
5827°
5611°