diff --git a/Scripts/Editor/NodeEditorGUI.cs b/Scripts/Editor/NodeEditorGUI.cs
index 0cfec5b..d00bb8d 100644
--- a/Scripts/Editor/NodeEditorGUI.cs
+++ b/Scripts/Editor/NodeEditorGUI.cs
@@ -454,7 +454,8 @@ namespace XNodeEditor {
GUIContent content = new GUIContent();
content.text = type.PrettyName();
if (hoveredPort.IsOutput) {
- object obj = hoveredPort.node.GetValue(hoveredPort);
+ if (hoveredPort.targetDelegate == null) hoveredPort.Initialize(hoveredPort.node.GetDelegate);
+ object obj = hoveredPort.targetDelegate.DynamicInvoke();
content.text += " = " + (obj != null ? obj.ToString() : "null");
}
Vector2 size = NodeEditorResources.styles.tooltip.CalcSize(content);
diff --git a/Scripts/Node.cs b/Scripts/Node.cs
index a280ff5..08d91a3 100644
--- a/Scripts/Node.cs
+++ b/Scripts/Node.cs
@@ -182,25 +182,6 @@ namespace XNode {
else return fallback;
}
- /// Returns a value based on requested port output. Should be overridden in all derived nodes with outputs.
- /// The requested port.
- public object GetValue(NodePort port) {
- if (port.targetDelegate == null) port.Initialize(GetDelegate);
- return port.targetDelegate.DynamicInvoke();
- }
-
- /// Returns a value based on requested port output. Should be overridden in all derived nodes with outputs.
- /// The requested port.
- public T GetValue(NodePort port) {
- if (port.targetDelegate == null) port.Initialize(GetDelegate);
- Func func = port.targetDelegate as Func;
-
- if (func != null)
- return func();
-
- return default(T); //default
- }
-
public abstract Delegate GetDelegate(string fieldName);
#endregion
diff --git a/Scripts/NodePort.cs b/Scripts/NodePort.cs
index 6b4c441..9ac920a 100644
--- a/Scripts/NodePort.cs
+++ b/Scripts/NodePort.cs
@@ -110,7 +110,13 @@ namespace XNode {
///
public T GetOutputValue() {
if (direction == IO.Input) return default(T);
- return node.GetValue(this);
+ if (targetDelegate == null) Initialize(node.GetDelegate);
+ Func func = targetDelegate as Func;
+
+ if (func != null)
+ return func();
+
+ return default(T); //default
}
/// Return the output value of the first connected port. Returns null if none found or invalid.