diff --git a/Assets/Scripts/UmaViewerBuilder.cs b/Assets/Scripts/UmaViewerBuilder.cs index b34fe3b..0c33d35 100644 --- a/Assets/Scripts/UmaViewerBuilder.cs +++ b/Assets/Scripts/UmaViewerBuilder.cs @@ -230,7 +230,6 @@ public class UmaViewerBuilder : MonoBehaviour var firsehead = CurrentUMAContainer.Head; var FaceDriven = firsehead.GetComponent()._assetTable.list.Find(a => { return a.Key == "facial_target"; }).Value as FaceDrivenKeyTarget; CurrentUMAContainer.FaceDrivenKeyTargets = FaceDriven; - FaceDriven.callBack = UmaViewerUI.Instance; FaceDriven.Initialize(firsehead.GetComponentsInChildren().ToList()); } diff --git a/Assets/Scripts/UmaViewerUI.cs b/Assets/Scripts/UmaViewerUI.cs index 8dee09f..9377869 100644 --- a/Assets/Scripts/UmaViewerUI.cs +++ b/Assets/Scripts/UmaViewerUI.cs @@ -9,7 +9,7 @@ using TMPro; using UnityEngine; using UnityEngine.UI; -public class UmaViewerUI : MonoBehaviour,FaceLoadCallBack +public class UmaViewerUI : MonoBehaviour { public static UmaViewerUI Instance; private UmaViewerMain Main => UmaViewerMain.Instance; @@ -425,11 +425,6 @@ public class UmaViewerUI : MonoBehaviour,FaceLoadCallBack Camera.main.backgroundColor = color; } - public void CallBack(FaceDrivenKeyTarget target) - { - LoadFacialPanels(target); - } - public void SetDynamicBoneEnable(bool isOn) { if (Builder.CurrentUMAContainer) diff --git a/Assets/Scripts/umamusume/Gallop/FaceDrivenKeyTarget.cs b/Assets/Scripts/umamusume/Gallop/FaceDrivenKeyTarget.cs index 91623ab..b369bf1 100644 --- a/Assets/Scripts/umamusume/Gallop/FaceDrivenKeyTarget.cs +++ b/Assets/Scripts/umamusume/Gallop/FaceDrivenKeyTarget.cs @@ -21,8 +21,6 @@ namespace Gallop public List MouthMorphs = new List(); Dictionary RotationRecorder = new Dictionary(); - - public FaceLoadCallBack callBack; public void Initialize(List objs) { Objs = objs; @@ -39,10 +37,6 @@ namespace Gallop foreach (TrsArray trs in morph.trsArray) { trs.transform = Objs.Find(ani => ani.name.Equals(trs._path)); - if (i == 0 && trs.transform) - { - RotationRecorder[trs.transform] = trs._rotation; - } } if (i == 0) { @@ -68,10 +62,6 @@ namespace Gallop foreach (TrsArray trs in morph.trsArray) { trs.transform = Objs.Find(ani => ani.name.Equals(trs._path)); - if(i == 0 && trs.transform) - { - RotationRecorder[trs.transform] = trs._rotation; - } } if (i == 0) { @@ -97,10 +87,6 @@ namespace Gallop foreach (TrsArray trs in morph.trsArray) { trs.transform = Objs.Find(ani => ani.name.Equals(trs._path)); - if (i == 0 && trs.transform) - { - RotationRecorder[trs.transform] = trs._rotation; - } } if (i == 0) { @@ -114,7 +100,7 @@ namespace Gallop } FacialReset(); MouthMorphs[3].Weight = 1; - if (callBack != null) { callBack.CallBack(this); } + if (UmaViewerUI.Instance) { UmaViewerUI.Instance.LoadFacialPanels(this); } } public void ChangeMorph() @@ -136,7 +122,7 @@ namespace Gallop ProcessMorph(morph); } - applyRotation(); + ApplyRotation(); } private void ProcessMorph(FacialMorph morph) { @@ -205,12 +191,10 @@ namespace Gallop }; } - applyRotation(); + ApplyRotation(); } - //trs.transform.localEulerAngles - - public void applyRotation(){ + public void ApplyRotation(){ foreach (var trs in RotationRecorder) { trs.Key.localEulerAngles = RotationConvert.fromMaya(trs.Value); diff --git a/Assets/Scripts/umamusume/Gallop/FaceLoadCallBack.cs b/Assets/Scripts/umamusume/Gallop/FaceLoadCallBack.cs deleted file mode 100644 index c35eee6..0000000 --- a/Assets/Scripts/umamusume/Gallop/FaceLoadCallBack.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Gallop -{ - public interface FaceLoadCallBack - { - public abstract void CallBack(FaceDrivenKeyTarget target); - } -} diff --git a/Assets/Scripts/umamusume/Gallop/FaceLoadCallBack.cs.meta b/Assets/Scripts/umamusume/Gallop/FaceLoadCallBack.cs.meta deleted file mode 100644 index 090e20d..0000000 --- a/Assets/Scripts/umamusume/Gallop/FaceLoadCallBack.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d7b0dd94109f6b445bd06165e34aea69 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: