mirror of
https://github.com/Siccity/xNode.git
synced 2026-03-26 22:49:02 +08:00
Make CopyNode virtual
I need to run extra editor logic when a node is added to the graph through copy/pasting
This commit is contained in:
parent
c2a99ba2b5
commit
b3ff9885b4
@ -171,7 +171,7 @@ namespace XNodeEditor {
|
||||
}
|
||||
|
||||
/// <summary> Creates a copy of the original node in the graph </summary>
|
||||
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 {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user