From b53035de8257f6e177bc4f805458c769d4a82a0d Mon Sep 17 00:00:00 2001 From: CroakFang <1605296300@qq.com> Date: Wed, 12 Apr 2023 20:26:33 +0800 Subject: [PATCH] bug fix --- Assets/Scripts/UmaViewerBuilder.cs | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/Assets/Scripts/UmaViewerBuilder.cs b/Assets/Scripts/UmaViewerBuilder.cs index 4fa7525..66e26df 100644 --- a/Assets/Scripts/UmaViewerBuilder.cs +++ b/Assets/Scripts/UmaViewerBuilder.cs @@ -23,7 +23,6 @@ public class UmaViewerBuilder : MonoBehaviour public Material TransMaterialCharas; public Material TransMaterialProps; public UmaContainer CurrentUMAContainer; - public UmaContainer CurrentLiveContainer; public UmaContainer CurrentOtherContainer; public UmaHeadData CurrentHead; @@ -914,10 +913,11 @@ public class UmaViewerBuilder : MonoBehaviour LoadAnimation(aClip); } - if (CurrentLiveContainer || aClip.name.Contains("tear")) + if (aClip.name.Contains("tear")) { break; } + UnloadBundle(bundle, false); break; } @@ -1336,7 +1336,7 @@ public class UmaViewerBuilder : MonoBehaviour private void LoadProp(GameObject go) { - var container = (go.name.Contains("Cutt_son") || go.name.Contains("pfb_env_live")) ? CurrentLiveContainer : CurrentOtherContainer; + var container = CurrentOtherContainer; var prop = Instantiate(go, container.transform); foreach (Renderer r in prop.GetComponentsInChildren()) { @@ -1738,7 +1738,6 @@ public class UmaViewerBuilder : MonoBehaviour if (unloadAllObjects) { if (CurrentUMAContainer) Destroy(CurrentUMAContainer); - if (CurrentLiveContainer) Destroy(CurrentLiveContainer); if (CurrentOtherContainer) Destroy(CurrentOtherContainer); } Main.LoadedBundles.Clear(); @@ -1829,14 +1828,6 @@ public class UmaViewerBuilder : MonoBehaviour } } - public void UnloadLive() - { - if (CurrentLiveContainer != null) - { - Destroy(CurrentLiveContainer.gameObject); - } - } - public void UnloadUma() { if (CurrentUMAContainer != null)