diff --git a/Assets/FullInspector2/Core/Editor/IBehaviorEditor.cs b/Assets/FullInspector2/Core/Editor/IBehaviorEditor.cs index 8822c62..5802185 100644 --- a/Assets/FullInspector2/Core/Editor/IBehaviorEditor.cs +++ b/Assets/FullInspector2/Core/Editor/IBehaviorEditor.cs @@ -79,6 +79,7 @@ public void Edit(Rect rect, UnityObject behavior) { // Run the editor OnEdit(rect, (TBehavior)behavior, fiPersistentMetadata.GetMetadataFor(behavior)); + fiGUI.PopLabelWidth(); EditorGUIUtility.labelWidth = savedLabelWidth; // If the GUI has been changed, then we want to reserialize the @@ -102,4 +103,4 @@ public float GetHeight(UnityObject behavior) { return OnGetHeight((TBehavior)behavior, fiPersistentMetadata.GetMetadataFor(behavior)); } } -} \ No newline at end of file +} diff --git a/Assets/FullInspector2/Core/Editor/IPropertyEditorExtensions.cs b/Assets/FullInspector2/Core/Editor/IPropertyEditorExtensions.cs index 8a43b4f..87dcf9e 100644 --- a/Assets/FullInspector2/Core/Editor/IPropertyEditorExtensions.cs +++ b/Assets/FullInspector2/Core/Editor/IPropertyEditorExtensions.cs @@ -93,6 +93,7 @@ public static T Edit(this IPropertyEditor editor, Rect region, GUIContent lab if (typeof(T).IsPrimitive) result = DoEditFast(api, region, label, element, metadata.Metadata); else result = DoEditSlow(api, region, label, element, metadata.Metadata); + fiGUI.PopLabelWidth(); EditorGUIUtility.labelWidth = currentLabeWidth; return result; @@ -325,4 +326,4 @@ public static T EditWithGUILayout(this IPropertyEditor editor, GUIContent lab return element; } } -} \ No newline at end of file +}