public static void SaveNodeCanvas(string path, NodeCanvas nodeCanvas, bool createWorkingCopy)
        {
#if !UNITY_EDITOR
            throw new System.NotImplementedException();
#else
            if (string.IsNullOrEmpty(path))
            {
                throw new UnityException("Cannot save NodeCanvas: No spath specified to save the NodeCanvas " + (nodeCanvas != null ? nodeCanvas.name : "") + " to!");
            }
            if (nodeCanvas == null)
            {
                throw new UnityException("Cannot save NodeCanvas: The specified NodeCanvas that should be saved to path " + path + " is null!");
            }
            if (nodeCanvas.livesInScene)
            {
                Debug.LogWarning("Attempting to save scene canvas " + nodeCanvas.name + " to an asset, scene object references will be broken!" + (!createWorkingCopy ? " No workingCopy is going to be created, so your scene save is broken, too!" : ""));
            }
#if UNITY_EDITOR
            if (!createWorkingCopy && UnityEditor.AssetDatabase.Contains(nodeCanvas) && UnityEditor.AssetDatabase.GetAssetPath(nodeCanvas) != path)
            {
                Debug.LogError("Trying to create a duplicate save file for '" + nodeCanvas.name + "'! Forcing to create a working copy!"); createWorkingCopy = true;
            }
#endif

#if UNITY_EDITOR
            nodeCanvas.BeforeSavingCanvas();


            ProcessCanvas(ref nodeCanvas, createWorkingCopy);
            nodeCanvas.livesInScene = false;


            UnityEditor.AssetDatabase.CreateAsset(nodeCanvas, path);
            AddSubAssets(nodeCanvas.editorStates, nodeCanvas);


            foreach (Node node in nodeCanvas.nodes)
            {
                AddSubAsset(node, nodeCanvas);
                AddSubAssets(node.GetScriptableObjects(), node);
                foreach (NodeKnob knob in node.nodeKnobs)
                {
                    AddSubAsset(knob, node);
                    AddSubAssets(knob.GetScriptableObjects(), knob);
                }
            }

            UnityEditor.AssetDatabase.SaveAssets();
            UnityEditor.AssetDatabase.Refresh();
#else
            // TODO: Node Editor: Need to implement ingame-saving (Resources, AsssetBundles, ... won't work)
#endif

            NodeEditorCallbacks.IssueOnSaveCanvas(nodeCanvas);
#endif
        }