From 910e020e0875644b97dd605d25f6388aa970f96a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B7=A6=E5=8F=B3=E7=9C=8B?= <1918891542@qq.com> Date: Mon, 31 Oct 2022 03:52:07 +0800 Subject: [PATCH] bug fix --- Assets/Scripts/UmaViewerBuilder.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Assets/Scripts/UmaViewerBuilder.cs b/Assets/Scripts/UmaViewerBuilder.cs index f881777..a69febb 100644 --- a/Assets/Scripts/UmaViewerBuilder.cs +++ b/Assets/Scripts/UmaViewerBuilder.cs @@ -966,6 +966,7 @@ public class UmaViewerBuilder : MonoBehaviour public void UnloadAllBundle(bool unloadAllObjects = false) { + foreach (var bundle in Main.LoadedBundles) { bundle.Value.Unload(unloadAllObjects); @@ -1017,6 +1018,7 @@ public class UmaViewerBuilder : MonoBehaviour { if (CurrentUMAContainer != null) { + //It seems that OnDestroy will executed after new model loaded, which cause new FacialPanels empty... UmaViewerUI.Instance.LoadFacialPanels(null); Destroy(CurrentUMAContainer.gameObject); }