fix: avoid changing editor's GUI.skin by creating a new instance of GUIStyle.

This commit is contained in:
Demexis 2025-02-26 03:08:32 +02:00
parent 2c74be99a9
commit 4bf61527a5

View File

@ -91,8 +91,9 @@ namespace DCFApixels {
Color defaultColor = GUI.color; Color defaultColor = GUI.color;
if (_labelStyle == null || _labelDummy == null) if (_labelStyle == null || _labelDummy == null)
{ {
_labelStyle = GUI.skin.label; _labelStyle = new GUIStyle(GUI.skin.label) {
_labelStyle.richText = false; richText = false
};
_labelDummy = new GUIContent(); _labelDummy = new GUIContent();
} }