1
0
mirror of https://github.com/Siccity/xNode.git synced 2026-02-06 15:24:55 +08:00

Tooltip now shows value from GetValue instead of field variable

This commit is contained in:
Thor Brigsted 2018-03-22 23:25:51 +01:00
parent ed2edab72f
commit 219c93557d

View File

@ -364,8 +364,8 @@ namespace XNodeEditor {
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);