diff --git a/Editor/Graph/Node.cs b/Editor/Graph/Node.cs index 53ade5d..de02b88 100644 --- a/Editor/Graph/Node.cs +++ b/Editor/Graph/Node.cs @@ -57,6 +57,17 @@ public virtual string GetContentTypeShortName() return GetContentTypeName().Split('.').Last(); } + public virtual string GetLabel() + { + return null; + } + + public virtual bool TryGetProgress(out float progress) + { + progress = 0f; + return false; + } + public override string ToString() { return "Node content: " + GetContentTypeName(); diff --git a/Editor/Graph/Renderer/DefaultGraphRenderer.cs b/Editor/Graph/Renderer/DefaultGraphRenderer.cs index 4951f2b..244f15b 100644 --- a/Editor/Graph/Renderer/DefaultGraphRenderer.cs +++ b/Editor/Graph/Renderer/DefaultGraphRenderer.cs @@ -459,9 +459,15 @@ private void DrawNode(Rect nodeRect, Node node, bool selected) { string nodeType = node.GetContentTypeName(); NodeTypeLegend nodeTypeLegend = m_LegendForType[nodeType]; - string formattedLabel = Regex.Replace(nodeTypeLegend.label, "((?