From 36117a4d52b5e875da088522c75b94c974d7640e Mon Sep 17 00:00:00 2001 From: Lacyway <20912169+Lacyway@users.noreply.github.com> Date: Thu, 5 Dec 2024 18:18:51 +0100 Subject: [PATCH] Fix MMUI again - Dispose of entire GameObject --- Fika.Core/UI/Custom/MatchMakerUIScript.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Fika.Core/UI/Custom/MatchMakerUIScript.cs b/Fika.Core/UI/Custom/MatchMakerUIScript.cs index 5c6532f7..d7d61e90 100644 --- a/Fika.Core/UI/Custom/MatchMakerUIScript.cs +++ b/Fika.Core/UI/Custom/MatchMakerUIScript.cs @@ -41,6 +41,7 @@ public DefaultUIButton AcceptButton private bool _started; private Coroutine serverQueryRoutine; private float loadingTextTick = 0f; + private GameObject mmGameObject; internal RaidSettings raidSettings; internal DefaultUIButton backButton; @@ -121,6 +122,7 @@ private void DestroyThis() Destroy(fikaMatchMakerUi); Destroy(this); + Destroy(mmGameObject); } protected void OnDestroy() @@ -138,6 +140,7 @@ private void CreateMatchMakerUI() GameObject matchMakerUiPrefab = InternalBundleLoader.Instance.GetAssetBundle("newmatchmakerui").LoadAsset("NewMatchMakerUI"); GameObject uiGameObj = Instantiate(matchMakerUiPrefab); + mmGameObject = uiGameObj; fikaMatchMakerUi = uiGameObj.GetComponent(); fikaMatchMakerUi.transform.parent = transform; fikaMatchMakerUi.GetComponent().sortingOrder = 100; // Might wanna do this directly in the SDK later