mirror of
https://github.com/Siccity/xNode.git
synced 2025-12-20 17:26:02 +08:00
Exposed node name
This commit is contained in:
parent
8b7b40933f
commit
9ef6069ea7
@ -139,7 +139,8 @@ public partial class NodeEditorWindow {
|
|||||||
|
|
||||||
GUIStyle style = (node == selectedNode) ? (GUIStyle)"flow node 0 on" : (GUIStyle)"flow node 0";
|
GUIStyle style = (node == selectedNode) ? (GUIStyle)"flow node 0 on" : (GUIStyle)"flow node 0";
|
||||||
GUILayout.BeginArea(new Rect(nodePos,new Vector2(200,4000)));
|
GUILayout.BeginArea(new Rect(nodePos,new Vector2(200,4000)));
|
||||||
GUILayout.BeginVertical(node.ToString(), style);
|
string nodeName = string.IsNullOrEmpty(node.name) ? node.ToString() : node.name;
|
||||||
|
GUILayout.BeginVertical(nodeName, style);
|
||||||
GUILayout.BeginHorizontal();
|
GUILayout.BeginHorizontal();
|
||||||
|
|
||||||
//Inputs
|
//Inputs
|
||||||
|
|||||||
@ -7,6 +7,8 @@ using System;
|
|||||||
[Serializable]
|
[Serializable]
|
||||||
public abstract class Node {
|
public abstract class Node {
|
||||||
|
|
||||||
|
/// <summary> Name of the node </summary>
|
||||||
|
public string name = "";
|
||||||
[NonSerialized] public NodeGraph graph;
|
[NonSerialized] public NodeGraph graph;
|
||||||
public string NodeType { get { return nodeType; } }
|
public string NodeType { get { return nodeType; } }
|
||||||
[SerializeField] private string nodeType;
|
[SerializeField] private string nodeType;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user