Clean Up Memory Of Un Useless Objects After End Game (#560)

* Cleam Up Memory After Game

* Remove
This commit is contained in:
TommyXL authored and GitHub committed 2026-04-05 09:29:57 +02:00
1 parent c5604bc100
commit 3a29800cda
1 file changed
+5
+5
View File
@@ -472,6 +472,9 @@ internal static class SetEverythingUpPatch
EndOfText:
LastWinsText = winnerText.text /*.RemoveHtmlTags()*/;
// Cleam up memory for objects that are no longer referenced
GC.Collect();
return;
IEnumerator SetupPoolablePlayers()
@@ -479,6 +482,8 @@ internal static class SetEverythingUpPatch
Camera main = Camera.main;
if (!main) yield break;
// Clear unused assets
Resources.UnloadUnusedAssets();
yield return null;
Vector3 pos = main.ViewportToWorldPoint(new(0f, 1f, main.nearClipPlane));