1.1,unity动画Animator

(1)模型动画

一种是美工完全制作好的分开的动画 ,

另一种是美工给了一个完整的动画,需要自己去分割

(2)切换动画和动画控制器,以及动画控制需要的参数

(3)控制动画和对应的状态

控制脚本

脚本文件

复制代码
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class TestAni_1 : MonoBehaviour
{

    private Animator anim;
    // Start is called before the first frame update
    void Start()
    {
        anim = GetComponent<Animator>();
    }

    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.W))
        {
            anim.SetBool("yap", true);
        }

        if (Input.GetKeyDown(KeyCode.S))
        {
            anim.SetBool("yap", false);
        }
    }
}
相关推荐
妙为1 天前
unreal engine5角色把敌人 “挤飞”
游戏引擎·虚幻·ue·unrealengine5
4Forsee1 天前
【增强现实】快速上手 Vuforia Unity Android AR 应用开发
android·unity·ar
两水先木示1 天前
【Unity】对指定物体进行描边——模板测试法
unity·游戏引擎·shader·外描边
Miss_SQ1 天前
实现Unity录音、百度云语音转文字
unity·语音识别
CreasyChan1 天前
unity 对象池实测可用
unity·c#
weixin_424294671 天前
Unity项目的Artifacts文件夹过大怎么解决?
unity·游戏引擎
没事写写笔记2 天前
Unity HDRP14.0.12 Volume 配置参数
unity
红黑色的圣西罗2 天前
手游手动异形屏适配方案,类“明日方舟”
unity
syker2 天前
3D游戏引擎Bluely Engine 开发手册
开发语言·3d·游戏引擎
Longyugxq3 天前
Untiy的Webgl端网页端视频播放,又不想直接mp4格式等格式的。
unity·音视频·webgl