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(); } }