From f2555a32fc967c8d8638402a03763476e323ce7f Mon Sep 17 00:00:00 2001 From: CroakFang <1605296300@qq.com> Date: Thu, 29 Sep 2022 17:44:06 +0800 Subject: [PATCH] update --- Assets/Scripts/UmaViewerBuilder.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Assets/Scripts/UmaViewerBuilder.cs b/Assets/Scripts/UmaViewerBuilder.cs index a8766a9..c30c3e6 100644 --- a/Assets/Scripts/UmaViewerBuilder.cs +++ b/Assets/Scripts/UmaViewerBuilder.cs @@ -901,7 +901,15 @@ public class UmaViewerBuilder : MonoBehaviour private void LoadAnimation(AnimationClip clip) { bool needTransit = false; - if (clip.name.EndsWith("_loop")) + if (clip.name.EndsWith("_S")) + { + CurrentUMAContainer.OverrideController["clip_s"] = clip; + } + else if (clip.name.EndsWith("_E")) + { + CurrentUMAContainer.OverrideController["clip_e"] = clip; + } + else if (clip.name.EndsWith("_loop")) { var motion_s = Main.AbList.FirstOrDefault(a => a.Name.EndsWith(clip.name.Replace("_loop", "_s"))); var motion_e = Main.AbList.FirstOrDefault(a => a.Name.EndsWith(CurrentUMAContainer.OverrideController["clip_2"].name.Replace("_loop", "_e"))); @@ -919,14 +927,6 @@ public class UmaViewerBuilder : MonoBehaviour CurrentUMAContainer.UmaAnimator.Play("motion_1", -1); CurrentUMAContainer.UmaAnimator.SetTrigger(needTransit ? "next_s" : "next"); } - else if(clip.name.EndsWith("_S")) - { - CurrentUMAContainer.OverrideController["clip_s"] = clip; - } - else if(clip.name.EndsWith("_E")) - { - CurrentUMAContainer.OverrideController["clip_e"] = clip; - } else { CurrentUMAContainer.OverrideController["clip_1"] = CurrentUMAContainer.OverrideController["clip_2"];