Update SerializeReferenceButtonAttributeDrawer.cs

This commit is contained in:
max 2022-12-28 17:05:22 +01:00
parent 840cf5ea4d
commit 808ed7dec9

View File

@ -1,4 +1,5 @@
#if UNITY_EDITOR 
#if UNITY_EDITOR
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEditor; using UnityEditor;
@ -16,8 +17,6 @@ namespace Textus.SerializeReferenceUI.Editor
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) 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); Rect labelPosition = new Rect(position.x, position.y, position.width, EditorGUIUtility.singleLineHeight);
EditorGUI.LabelField(labelPosition, label); EditorGUI.LabelField(labelPosition, label);
@ -25,8 +24,6 @@ namespace Textus.SerializeReferenceUI.Editor
property.DrawSelectionButtonForManagedReference(position, typeRestrictions); property.DrawSelectionButtonForManagedReference(position, typeRestrictions);
EditorGUI.PropertyField(position, property, GUIContent.none, true); EditorGUI.PropertyField(position, property, GUIContent.none, true);
EditorGUI.EndProperty();
} }
} }
} }