1
0
mirror of https://github.com/Siccity/xNode.git synced 2025-12-20 17:26:02 +08:00

InstancePortList custom PropertyHeight supported

This commit is contained in:
Thor Brigsted 2018-10-26 18:42:16 +02:00
parent 0b008c77eb
commit bad05a6e64

View File

@ -285,6 +285,10 @@ namespace XNodeEditor {
Vector2 pos = rect.position + (port.IsOutput?new Vector2(rect.width + 6, 0) : new Vector2(-36, 0));
NodeEditorGUILayout.PortField(pos, port);
};
list.elementHeightCallback = (int index) => {
SerializedProperty itemData = arrayData.GetArrayElementAtIndex(index);
return EditorGUI.GetPropertyHeight(itemData);
};
list.drawHeaderCallback =
(Rect rect) => {
EditorGUI.LabelField(rect, label);