From fad4173fa721f81aad88c4297f635147d64e8077 Mon Sep 17 00:00:00 2001 From: Braedon Lewis Date: Tue, 19 Sep 2023 18:09:45 -0400 Subject: [PATCH] Release game's render texture before resizing it (#548) --- Assets/Scripts/GlobalGameManager.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Assets/Scripts/GlobalGameManager.cs b/Assets/Scripts/GlobalGameManager.cs index c3b95edc..8df0874c 100644 --- a/Assets/Scripts/GlobalGameManager.cs +++ b/Assets/Scripts/GlobalGameManager.cs @@ -327,11 +327,20 @@ namespace HeavenStudio height = (int)(width / 16f * 9f); } + GameRenderTexture.Release(); + GameRenderTexture.width = width; GameRenderTexture.height = height; + GameRenderTexture.Create(); + + + OverlayRenderTexture.Release(); + OverlayRenderTexture.width = (int)(width * 1.5f); OverlayRenderTexture.height = (int)(height * 1.5f); + + OverlayRenderTexture.Create(); } public static void ChangeMasterVolume(float value)