发布时间:2019-09-05 07:06:33编辑:auto阅读(2258)
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 版本学习之入门
51338
50794
41385
38188
32677
29573
28409
23288
23249
21577
1658°
2385°
1991°
1931°
2260°
1964°
2660°
4465°
4294°
3060°