Animator动画按钮拆分播放

直接贴代码

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Test : MonoBehaviour
{
    public Animator mAni;
    public bool ison=false;

    public void PlayMybock1()
    {
        if (ison == false)
        {
            mAni.SetBool("NewBool", true);
            mAni.SetBool("NewBools", true);        
            ison = true;
        }
        else
        {
            mAni.SetBool("NewBool", false);
            mAni.SetBool("NewBools", false);
            ison = false;
        }             
    }
}
示例图

推荐阅读更多精彩内容