From 808ed7dec9c60f761853adf4c2e0bddfbbd999c4 Mon Sep 17 00:00:00 2001 From: max Date: Wed, 28 Dec 2022 17:05:22 +0100 Subject: [PATCH] Update SerializeReferenceButtonAttributeDrawer.cs --- .../Attributes/SerializeReferenceButtonAttributeDrawer.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Editor/Attributes/SerializeReferenceButtonAttributeDrawer.cs b/Editor/Attributes/SerializeReferenceButtonAttributeDrawer.cs index ca8bc60..85d5d80 100644 --- a/Editor/Attributes/SerializeReferenceButtonAttributeDrawer.cs +++ b/Editor/Attributes/SerializeReferenceButtonAttributeDrawer.cs @@ -1,4 +1,5 @@ -#if UNITY_EDITOR + +#if UNITY_EDITOR using System; using System.Collections.Generic; using UnityEditor; @@ -16,8 +17,6 @@ namespace Textus.SerializeReferenceUI.Editor public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) { - EditorGUI.BeginProperty(position, label, property); - Rect labelPosition = new Rect(position.x, position.y, position.width, EditorGUIUtility.singleLineHeight); EditorGUI.LabelField(labelPosition, label); @@ -25,8 +24,6 @@ namespace Textus.SerializeReferenceUI.Editor property.DrawSelectionButtonForManagedReference(position, typeRestrictions); EditorGUI.PropertyField(position, property, GUIContent.none, true); - - EditorGUI.EndProperty(); } } }