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])); } }
public bool AddBlend(EasyBlendTree tree, PlayableGraph graph, AnimationMixerPlayable mixer) { var findBlend = FindBlend(tree.name); if (findBlend == null) { for (int i = 0; i < tree.BlendMotions.Count; i++) { var clip = tree.BlendMotions[i].Motion as AnimationClip; string animationName = tree.name + "_" + clip.name + "_" + i; Add(clip, animationName, graph, mixer); } blends.Add(new EasyAnimationStateBlend(this, tree, graph, mixer)); DebugLog.Normal($"EasyAnimationStateManager.AddBlend : ブレンドアニメーションステートを追加しました。{tree.name}", DebugLogColor.animation); return(true); } DebugLog.Warning($"EasyAnimationStateManager.AddBlend : 同名ブレンドアニメーションステートが存在しているため、追加に失敗しました。{tree.name}", DebugLogColor.animation); return(false); }
public bool Add(EasyBlendTree blendTree) { return(_stateManager.AddBlend(blendTree, _graph, _mixer)); }