From 6d3167a563b0ebfb84bdc34e5a4761fd60cc46cf Mon Sep 17 00:00:00 2001 From: CroakFang <1605296300@qq.com> Date: Wed, 2 Nov 2022 09:21:12 +0800 Subject: [PATCH] bug fix --- Assets/Scripts/UmaViewerBuilder.cs | 11 +++++------ .../Scripts/umamusume/Gallop/FaceEmotionKeyTarget.cs | 2 -- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/Assets/Scripts/UmaViewerBuilder.cs b/Assets/Scripts/UmaViewerBuilder.cs index 8762b42..cf5cf47 100644 --- a/Assets/Scripts/UmaViewerBuilder.cs +++ b/Assets/Scripts/UmaViewerBuilder.cs @@ -277,12 +277,11 @@ public class UmaViewerBuilder : MonoBehaviour CurrentUMAContainer.FaceDrivenKeyTarget.Container = CurrentUMAContainer; FaceDriven.Initialize(firsehead.GetComponentsInChildren().ToList()); - CurrentUMAContainer.FaceEmotionKeyTarget = new FaceEmotionKeyTarget() - { - FaceDrivenKeyTarget = FaceDriven, - FaceEmotionKey = UmaDatabaseController.Instance.FaceTypeData.ToList() - }; - CurrentUMAContainer.FaceEmotionKeyTarget.Initialize(); + var emotionDriven = ScriptableObject.CreateInstance(); + CurrentUMAContainer.FaceEmotionKeyTarget = emotionDriven; + emotionDriven.FaceDrivenKeyTarget = FaceDriven; + emotionDriven.FaceEmotionKey = UmaDatabaseController.Instance.FaceTypeData.ToList(); + emotionDriven.Initialize(); } CurrentUMAContainer.MergeModel(); diff --git a/Assets/Scripts/umamusume/Gallop/FaceEmotionKeyTarget.cs b/Assets/Scripts/umamusume/Gallop/FaceEmotionKeyTarget.cs index 961715f..d019e75 100644 --- a/Assets/Scripts/umamusume/Gallop/FaceEmotionKeyTarget.cs +++ b/Assets/Scripts/umamusume/Gallop/FaceEmotionKeyTarget.cs @@ -81,9 +81,7 @@ public class FaceEmotionKeyTarget : ScriptableObject key.morph.weight += key.weight / 100 * emotion.Weight; } } - } - FaceDrivenKeyTarget.ChangeMorph(); } }