1
0
mirror of https://github.com/Siccity/xNode.git synced 2026-03-26 22:49:02 +08:00

made RemoveNode function virtual

used for example when a graph wants to block a delete
This commit is contained in:
Simon Rodriguez 2019-05-13 18:44:59 +02:00
parent 8a03811ee3
commit 7ca9100a69

View File

@ -93,7 +93,7 @@ namespace XNodeEditor {
} }
/// <summary> Safely remove a node and all its connections. </summary> /// <summary> Safely remove a node and all its connections. </summary>
public void RemoveNode(XNode.Node node) { public virtual void RemoveNode(XNode.Node node) {
UnityEngine.Object.DestroyImmediate(node, true); UnityEngine.Object.DestroyImmediate(node, true);
target.RemoveNode(node); target.RemoveNode(node);
if (NodeEditorPreferences.GetSettings().autoSave) AssetDatabase.SaveAssets(); if (NodeEditorPreferences.GetSettings().autoSave) AssetDatabase.SaveAssets();