Skip to content

Commit

Permalink
Fix MMUI again
Browse files Browse the repository at this point in the history
- Dispose of entire GameObject
  • Loading branch information
Lacyway committed Dec 5, 2024
1 parent d8fd0ca commit 36117a4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Fika.Core/UI/Custom/MatchMakerUIScript.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -121,6 +122,7 @@ private void DestroyThis()

Destroy(fikaMatchMakerUi);
Destroy(this);
Destroy(mmGameObject);
}

protected void OnDestroy()
Expand All @@ -138,6 +140,7 @@ private void CreateMatchMakerUI()

GameObject matchMakerUiPrefab = InternalBundleLoader.Instance.GetAssetBundle("newmatchmakerui").LoadAsset<GameObject>("NewMatchMakerUI");
GameObject uiGameObj = Instantiate(matchMakerUiPrefab);
mmGameObject = uiGameObj;
fikaMatchMakerUi = uiGameObj.GetComponent<MatchMakerUI>();
fikaMatchMakerUi.transform.parent = transform;
fikaMatchMakerUi.GetComponent<Canvas>().sortingOrder = 100; // Might wanna do this directly in the SDK later
Expand Down

0 comments on commit 36117a4

Please sign in to comment.