Skip to content

Commit

Permalink
Tooltip now shows value from GetValue instead of field variable
Browse files Browse the repository at this point in the history
Siccity committed Mar 22, 2018
1 parent ed2edab commit 219c935
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Scripts/Editor/NodeEditorGUI.cs
Original file line number Diff line number Diff line change
@@ -364,8 +364,8 @@ private void DrawTooltip() {
GUIContent content = new GUIContent();
content.text = type.PrettyName();
if (hoveredPort.IsStatic && hoveredPort.IsOutput) {
object obj = ObjectFromFieldName(hoveredPort.node, hoveredPort.fieldName);
if (obj != null) content.text += " = " + obj.ToString();
object obj = hoveredPort.node.GetValue(hoveredPort);
content.text += " = " + (obj != null ? obj.ToString() : "null");
}
Vector2 size = NodeEditorResources.styles.tooltip.CalcSize(content);
Rect rect = new Rect(Event.current.mousePosition - (size), size);

0 comments on commit 219c935

Please sign in to comment.