using UnityEngine; using System; public static class AnimatorExtensions { /// GetBehaviourで取得出来ればfuncに渡す public static bool FindBehaviour(this Animator t, Action func) where T : StateMachineBehaviour { T behaviour = t.GetBehaviour(); if(behaviour != null){ func(behaviour); return true; }else{ return false; } } }