public void SaveSceneNodeCanvas(string path)
 {
     nodeCanvas.editorStates = new NodeEditorState[] { editorState };
     NodeEditorSaveManager.SaveSceneNodeCanvas(path, ref nodeCanvas, true);
     editorState = NodeEditorSaveManager.ExtractEditorState(nodeCanvas, MainEditorStateIdentifier);
         #if UNITY_EDITOR
     if (useCache)
     {
         DeleteCache();
     }
         #endif
     NodeEditor.RepaintClients();
 }
        private void SaveCache()
        {
            if (!useCache)
            {
                return;
            }
            if (nodeCanvas.livesInScene)
            {
                DeleteCache();
                return;
            }

            nodeCanvas.editorStates = new NodeEditorState[] { editorState };
            NodeEditorSaveManager.SaveNodeCanvas(lastSessionPath, nodeCanvas, false);

            CheckCurrentCache();
        }
        public void LoadNodeCanvas(string path)
        {
            if (!File.Exists(path) || (nodeCanvas = NodeEditorSaveManager.LoadNodeCanvas(path, true)) == null)
            {
                NewNodeCanvas();
                return;
            }
            editorState = NodeEditorSaveManager.ExtractEditorState(nodeCanvas, MainEditorStateIdentifier);

            openedCanvasPath = path;
                #if UNITY_EDITOR
            if (useCache)
            {
                SaveCache();
            }
                #endif
            NodeEditor.RecalculateAll(nodeCanvas);
            NodeEditor.RepaintClients();
        }
 public void SaveNodeCanvas(string path)
 {
     nodeCanvas.editorStates = new NodeEditorState[] { editorState };
     NodeEditorSaveManager.SaveNodeCanvas(path, nodeCanvas, true);
     NodeEditor.RepaintClients();
 }
 public void SetCanvas(NodeCanvas canvas)
 {
     nodeCanvas  = canvas;
     editorState = NodeEditorSaveManager.ExtractEditorState(nodeCanvas, MainEditorStateIdentifier);
     NodeEditor.RepaintClients();
 }