public bool Play(int index, float time = 0.0f, float transitionTime = 0.3f) { var target = _stateManager.Find(index); if (target == null) { DebugLog.Error($"EasyAnimationPlayable.Play : アニメーションステートが存在しないため再生できませんでした。{index}", DebugLogColor.animation); return(false); } return(Play(target.StateName, time, transitionTime)); }
public EasyAnimationStateBlend(EasyAnimationStateManager stateManager, EasyBlendTree tree, PlayableGraph graph, AnimationMixerPlayable mixer) { StateName = tree.name; for (int i = 0; i < tree.BlendMotions.Count; i++) { var clip = tree.BlendMotions[i].Motion as AnimationClip; string animationName = tree.name + "_" + clip.name + "_" + i; var state = stateManager.Find(animationName); _maps.Add(new Map(state, tree.BlendMotions[i])); } }