发布时间:2019-09-05 07:06:33编辑:auto阅读(2300)
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 版本学习之入门
51598
51190
41693
38453
32939
29928
28630
23594
23525
21875
2034°
2744°
2290°
2221°
2703°
2244°
2996°
4933°
4792°
3411°