From 6c76f9a2c29ebd2e5efc915914e7b2c4637d4d24 Mon Sep 17 00:00:00 2001 From: Simon Rodriguez Date: Mon, 13 May 2019 18:45:31 +0200 Subject: [PATCH] switched order of remove function and destroy function. target.RemoveNode was always getting a null value --- Scripts/Editor/NodeGraphEditor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/Editor/NodeGraphEditor.cs b/Scripts/Editor/NodeGraphEditor.cs index f618d42..c509d28 100644 --- a/Scripts/Editor/NodeGraphEditor.cs +++ b/Scripts/Editor/NodeGraphEditor.cs @@ -94,8 +94,8 @@ namespace XNodeEditor { /// Safely remove a node and all its connections. public virtual void RemoveNode(XNode.Node node) { - UnityEngine.Object.DestroyImmediate(node, true); target.RemoveNode(node); + UnityEngine.Object.DestroyImmediate(node, true); if (NodeEditorPreferences.GetSettings().autoSave) AssetDatabase.SaveAssets(); }