mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-10-20 01:46:25 +00:00
Clean Up Memory Of Un Useless Objects After End Game (#560)
* Cleam Up Memory After Game * Remove
This commit is contained in:
1 parent
c5604bc100
commit
3a29800cda
1 file changed
+5
@@ -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));
|
||||
|
||||
Reference in new issue
Block a user