mirror of
https://github.com/Siccity/xNode.git
synced 2025-12-21 01:36:03 +08:00
Make RemoveNode + switch order
* made RemoveNode function virtual used for example when a graph wants to block a delete * switched order of remove function and destroy function. target.RemoveNode was always getting a null value
This commit is contained in:
parent
8a03811ee3
commit
833e26ccc3
@ -93,9 +93,9 @@ namespace XNodeEditor {
|
||||
}
|
||||
|
||||
/// <summary> Safely remove a node and all its connections. </summary>
|
||||
public void RemoveNode(XNode.Node node) {
|
||||
UnityEngine.Object.DestroyImmediate(node, true);
|
||||
public virtual void RemoveNode(XNode.Node node) {
|
||||
target.RemoveNode(node);
|
||||
UnityEngine.Object.DestroyImmediate(node, true);
|
||||
if (NodeEditorPreferences.GetSettings().autoSave) AssetDatabase.SaveAssets();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user