Quantcast
Channel: Questions in topic: "issue"
Viewing all articles
Browse latest Browse all 827

ReorderableList do not resize a height of each element(property drawer)

$
0
0
In 2020, the collection is displayed in the inspector view in the form of a Reorderable List. The drag item works normally for the last element. However, the rest of the elements do not work even when the item is dragged, so the height cannot be adjusted. public override float GetPropertyHeight(SerializedProperty property, GUIContent label) { var targetObj = property.FindPropertyRelative(targetObjName).objectReferenceValue; // only last element works. Debug.Log(property.FindPropertyRelative(targetObjName).propertyPath); return base.GetPropertyHeight(property, label) + (targetObj != null ? lineHeight + verticalSpacing : 0); } cf. Check Reference is a custom property class that inherits PropertyDrawer. ![alt text][1] [1]: /storage/temp/179082-issue.jpg

Viewing all articles
Browse latest Browse all 827

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>