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:
parent
ed2edab72f
commit
219c93557d
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user