1
0
mirror of https://github.com/Siccity/xNode.git synced 2025-12-20 09:16:01 +08:00

Added label before drawing InstancePortList

This commit is contained in:
Simon Rodriguez 2018-09-22 11:09:08 +02:00
parent 7ee89ba79c
commit 98edbf0c80

View File

@ -50,6 +50,7 @@ namespace XNodeEditor {
if (instancePortList) {
Type type = GetType(property);
XNode.Node.ConnectionType connectionType = inputAttribute != null ? inputAttribute.connectionType : XNode.Node.ConnectionType.Multiple;
EditorGUILayout.LabelField(label != null ? label : new GUIContent(property.displayName));
InstancePortList(property.name, type, property.serializedObject, port.direction, connectionType);
return;
}
@ -86,6 +87,7 @@ namespace XNodeEditor {
if (instancePortList) {
Type type = GetType(property);
XNode.Node.ConnectionType connectionType = outputAttribute != null ? outputAttribute.connectionType : XNode.Node.ConnectionType.Multiple;
EditorGUILayout.LabelField(label != null ? label : new GUIContent(property.displayName));
InstancePortList(property.name, type, property.serializedObject, port.direction, connectionType);
return;
}