From 98edbf0c80abc37dd52246af6e09df4154b3bfc3 Mon Sep 17 00:00:00 2001 From: Simon Rodriguez Date: Sat, 22 Sep 2018 11:09:08 +0200 Subject: [PATCH] Added label before drawing InstancePortList --- Scripts/Editor/NodeEditorGUILayout.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Scripts/Editor/NodeEditorGUILayout.cs b/Scripts/Editor/NodeEditorGUILayout.cs index d0bdc11..301654a 100644 --- a/Scripts/Editor/NodeEditorGUILayout.cs +++ b/Scripts/Editor/NodeEditorGUILayout.cs @@ -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; }