diff --git a/Assets/Editor Toolbox/Editor/Drawers/Toolbox/PropertyList/ScrollableItemsAttributeDrawer.cs b/Assets/Editor Toolbox/Editor/Drawers/Toolbox/PropertyList/ScrollableItemsAttributeDrawer.cs index bfc01460..921d63d8 100644 --- a/Assets/Editor Toolbox/Editor/Drawers/Toolbox/PropertyList/ScrollableItemsAttributeDrawer.cs +++ b/Assets/Editor Toolbox/Editor/Drawers/Toolbox/PropertyList/ScrollableItemsAttributeDrawer.cs @@ -17,7 +17,6 @@ static ScrollableItemsAttributeDrawer() private static readonly PropertyDataStorage storage; - private void DrawSettingsBody(SerializedProperty property, ScrollableItemsAttribute attribute, out int size, out Vector2 indexRange) { EditorGUILayout.PropertyField(property.GetSize()); @@ -53,7 +52,6 @@ private void DrawElementsBody(SerializedProperty property, ScrollableItemsAttrib } } - protected override void OnGuiSafe(SerializedProperty property, GUIContent label, ScrollableItemsAttribute attribute) { using (var propertyScope = new PropertyScope(property, label)) @@ -70,7 +68,6 @@ protected override void OnGuiSafe(SerializedProperty property, GUIContent label, } } - private static class Style { //TODO: apply custom styling for the drawer diff --git a/Assets/Editor Toolbox/Editor/Internal/PropertyScope.cs b/Assets/Editor Toolbox/Editor/Internal/PropertyScope.cs index 681d4384..fc9f9136 100644 --- a/Assets/Editor Toolbox/Editor/Internal/PropertyScope.cs +++ b/Assets/Editor Toolbox/Editor/Internal/PropertyScope.cs @@ -71,7 +71,10 @@ public void Dispose() Close(); } - public bool IsVisible => property.isExpanded; + /// + /// Indicates whether property is expanded and has any children to draw. + /// + public bool IsVisible => property.isExpanded && property.hasVisibleChildren; public Rect LabelRect { get; private set; } public Rect InputRect { get; private set; } } diff --git a/Assets/Examples/Scripts/SampleBehaviour6.cs b/Assets/Examples/Scripts/SampleBehaviour6.cs index 02cb0077..31d43fc3 100644 --- a/Assets/Examples/Scripts/SampleBehaviour6.cs +++ b/Assets/Examples/Scripts/SampleBehaviour6.cs @@ -88,7 +88,7 @@ public class ClassWithInterface4 : ClassWithInterface2 public int var33; } -#endregion + #endregion #region Generic Types