From b3ff9885b44958c244c6e507ab93413cc74390e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Th=C3=A9ry?= Date: Thu, 23 Apr 2020 10:55:42 +0200 Subject: [PATCH] Make CopyNode virtual I need to run extra editor logic when a node is added to the graph through copy/pasting --- Scripts/Editor/NodeGraphEditor.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Scripts/Editor/NodeGraphEditor.cs b/Scripts/Editor/NodeGraphEditor.cs index 3806d39..7551e2f 100644 --- a/Scripts/Editor/NodeGraphEditor.cs +++ b/Scripts/Editor/NodeGraphEditor.cs @@ -171,7 +171,7 @@ namespace XNodeEditor { } /// Creates a copy of the original node in the graph - public XNode.Node CopyNode(XNode.Node original) { + public virtual XNode.Node CopyNode(XNode.Node original) { Undo.RecordObject(target, "Duplicate Node"); XNode.Node node = target.CopyNode(original); Undo.RegisterCreatedObjectUndo(node, "Duplicate Node"); @@ -211,4 +211,4 @@ namespace XNodeEditor { } } } -} \ No newline at end of file +}