diff --git a/Assets/Scripts/UmaViewerBuilder.cs b/Assets/Scripts/UmaViewerBuilder.cs index ad03aa5..3bb1ea4 100644 --- a/Assets/Scripts/UmaViewerBuilder.cs +++ b/Assets/Scripts/UmaViewerBuilder.cs @@ -1029,6 +1029,8 @@ public class UmaViewerBuilder : MonoBehaviour if (CurrentUMAContainer != null) { //It seems that OnDestroy will executed after new model loaded, which cause new FacialPanels empty... + UmaViewerUI.Instance.currentMorph = null; + UmaViewerUI.Instance.LoadEmotionPanels(null); UmaViewerUI.Instance.LoadFacialPanels(null); Destroy(CurrentUMAContainer.gameObject); } diff --git a/Assets/Scripts/UmaViewerUI.cs b/Assets/Scripts/UmaViewerUI.cs index 68692b7..e8f863f 100644 --- a/Assets/Scripts/UmaViewerUI.cs +++ b/Assets/Scripts/UmaViewerUI.cs @@ -200,7 +200,7 @@ public class UmaViewerUI : MonoBehaviour Destroy(ui.gameObject); } - + if (target == null) return; foreach(var emotion in target.Container.FaceEmotionKey) {