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

switched order of remove function and destroy function.

target.RemoveNode was always getting a null value
This commit is contained in:
Simon Rodriguez 2019-05-13 18:45:31 +02:00
parent 7ca9100a69
commit 6c76f9a2c2

View File

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