上一篇写了如何自动切割动画,这一篇写如何自动生成AnimatorController. 之前网上查了很多资料,看的一直很蒙,看不懂是怎么回事的,这里我先给大家明确几个概念: 画的不好,大家将就着看,写这个工具我们会涉及到很多类,类名包含上图哪个关键字,这个东西就跟哪个东西有关 只要大家能明确这些概念,看懂代码就不难了,下面上代码: using UnityEngine; using UnityEditor; using System.IO; using UnityEditor.Animations
今天小伙伴问我如何自己写一段代码检测 单击 双击 和 拖放.于是就写了这段代码O(∩_∩)O~ 代码如下: using UnityEngine; using System.Collections; public class Test2 : MonoBehaviour { public float oneTime; //检测双击的有效时间 private int downCount; //判断是单击还是双击 private bool currentCheck; //当前正在检测 private b