由于动作设计经常修改动作,所以每次改完都要再添加一次animation的事件,所以就直接写了个脚本,当然以后可以做成表格,然后用脚本从表格中读取,然后生成对应的animation事件.在Assets/Editor目录中放置代码,参考代码如下: using UnityEngine; using System.Collections; using UnityEditor; public class AddEventsToAnimations : MonoBehaviour { [MenuItem("…
Animator控制参数和添加事件 using UnityEngine; using System.Collections; public class AniControl : MonoBehaviour { public bool IsRolling = false; public bool IsDead = false; public bool IsJump = false; public float Direction = 0.5f; public Animator Anitor; pub…