From aabe5106122a289bcce19857cf5b92a6d5c663d1 Mon Sep 17 00:00:00 2001 From: "F.H" Date: Tue, 30 Aug 2022 13:49:58 +0200 Subject: [PATCH] Update SerializableCallbackDrawer.cs Fixing a problem with adding infinite spaces to the label... --- Editor/SerializableCallbackDrawer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Editor/SerializableCallbackDrawer.cs b/Editor/SerializableCallbackDrawer.cs index 561796c..1d6207c 100644 --- a/Editor/SerializableCallbackDrawer.cs +++ b/Editor/SerializableCallbackDrawer.cs @@ -16,7 +16,7 @@ public override void OnGUI(Rect position, SerializedProperty property, GUIConten property.serializedObject.ApplyModifiedProperties(); // Indent label - label.text = " " + label.text; + label = new GUIContent(label) { text = " " + label.text }; #if UNITY_2019_1_OR_NEWER GUI.Box(position, "");