mirror of
https://github.com/Siccity/xNode.git
synced 2026-03-26 22:49:02 +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();
|
GUIContent content = new GUIContent();
|
||||||
content.text = type.PrettyName();
|
content.text = type.PrettyName();
|
||||||
if (hoveredPort.IsStatic && hoveredPort.IsOutput) {
|
if (hoveredPort.IsStatic && hoveredPort.IsOutput) {
|
||||||
object obj = ObjectFromFieldName(hoveredPort.node, hoveredPort.fieldName);
|
object obj = hoveredPort.node.GetValue(hoveredPort);
|
||||||
if (obj != null) content.text += " = " + obj.ToString();
|
content.text += " = " + (obj != null ? obj.ToString() : "null");
|
||||||
}
|
}
|
||||||
Vector2 size = NodeEditorResources.styles.tooltip.CalcSize(content);
|
Vector2 size = NodeEditorResources.styles.tooltip.CalcSize(content);
|
||||||
Rect rect = new Rect(Event.current.mousePosition - (size), size);
|
Rect rect = new Rect(Event.current.mousePosition - (size), size);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user