From 4bf61527a544a0704e43c8bf17ead00467b003ed Mon Sep 17 00:00:00 2001 From: Demexis Date: Wed, 26 Feb 2025 03:08:32 +0200 Subject: [PATCH] fix: avoid changing editor's GUI.skin by creating a new instance of GUIStyle. --- Runtime/Gizmos/DebugX.text.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Runtime/Gizmos/DebugX.text.cs b/Runtime/Gizmos/DebugX.text.cs index 06751bc..34fcf32 100644 --- a/Runtime/Gizmos/DebugX.text.cs +++ b/Runtime/Gizmos/DebugX.text.cs @@ -91,8 +91,9 @@ namespace DCFApixels { Color defaultColor = GUI.color; if (_labelStyle == null || _labelDummy == null) { - _labelStyle = GUI.skin.label; - _labelStyle.richText = false; + _labelStyle = new GUIStyle(GUI.skin.label) { + richText = false + }; _labelDummy = new GUIContent(); }