diff --git a/src/Editor/ReferenceButtonAttribute.cs b/src/Editor/ReferenceButtonAttribute.cs index 5890965..f33e9b0 100644 --- a/src/Editor/ReferenceButtonAttribute.cs +++ b/src/Editor/ReferenceButtonAttribute.cs @@ -38,6 +38,7 @@ namespace DCFApixels.DragonECS.Unity.Editors { fieldType = fieldType.GetGenericTypeDefinition(); } + if (fieldType == referenceBaseType) { _isReferenceWrapper = true; @@ -51,11 +52,11 @@ namespace DCFApixels.DragonECS.Unity.Editors public override float GetPropertyHeight(SerializedProperty property, GUIContent label) { + Init(); if (_isReferenceWrapper) { property.Next(true); } - if (property.managedReferenceValue != null) { return EditorGUI.GetPropertyHeight(property, label, true);