From afa43b274c12d731c9139cc15c0b4b4b2500cd01 Mon Sep 17 00:00:00 2001 From: Druker Remus-Antonio Date: Thu, 9 Apr 2026 16:57:30 +0300 Subject: [PATCH] Add drawing material setup in DebugGUIWindow to fix Unity6 error Fix for Unity6 of error: "GL.End requires material.SetPass before" --- Assets/Plugins/DebugGUI/Windows/DebugGUIWindow.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Assets/Plugins/DebugGUI/Windows/DebugGUIWindow.cs b/Assets/Plugins/DebugGUI/Windows/DebugGUIWindow.cs index 8fdbf10..7c535ec 100644 --- a/Assets/Plugins/DebugGUI/Windows/DebugGUIWindow.cs +++ b/Assets/Plugins/DebugGUI/Windows/DebugGUIWindow.cs @@ -126,6 +126,8 @@ protected void DrawRect(Rect rect, Color color, Vector2 padding = default) rect.position += this.rect.position; rect.size += padding * 2; + drawMat.SetPass(0); + GL.Begin(GL.QUADS); { GL.Color(color); @@ -164,4 +166,4 @@ protected void DrawLabel(Rect rect, string label, Vector2 padding = default, GUI GUI.Label(new Rect(rect.position + padding, rect.size + padding), tmpGuiContent, style ?? GUIStyle.none); } } -} \ No newline at end of file +}