1
0
mirror of https://github.com/Siccity/xNode.git synced 2025-12-21 17:56:06 +08:00
xNode/Example/Nodes/Editor/DisplayValueEditor.cs
2017-10-16 21:08:35 +02:00

19 lines
543 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
[CustomNodeEditor(typeof(DisplayValue), "Display Value")]
public class DisplayValueEditor : NodeEditor {
protected override void OnBodyGUI(out Dictionary<NodePort, Vector2> portPositions) {
base.OnBodyGUI(out portPositions);
EditorGUILayout.LabelField("Value: " + GetResult());
}
public float GetResult() {
ExampleNodeBase t = target as ExampleNodeBase;
return t.GetInputFloat("value");
}
}