From ade1cfc35f0cc4b6df1f0d0bce7d0a7ca1e23e46 Mon Sep 17 00:00:00 2001 From: js6pak Date: Sat, 30 Oct 2021 13:43:36 +0200 Subject: [PATCH] Fix imgui windows flickering --- Reactor/Extensions/GUIExtensions.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Reactor/Extensions/GUIExtensions.cs b/Reactor/Extensions/GUIExtensions.cs index 68116f1..5ef95eb 100644 --- a/Reactor/Extensions/GUIExtensions.cs +++ b/Reactor/Extensions/GUIExtensions.cs @@ -114,7 +114,11 @@ namespace Reactor.Extensions { if (Enabled) { - Rect = Rect.ResetSize(); + if (Event.current.type == EventType.Layout) + { + Rect = Rect.ResetSize(); + } + Rect = GUILayout.Window(Id, Rect, Func, Title, new Il2CppReferenceArray(0)); if ((Input.GetMouseButtonDown(0) || Input.GetMouseButtonDown(1)) && Rect.Contains(new Vector2(Input.mousePosition.x, Screen.height - Input.mousePosition.y)))