/// <summary>
        /// 供外部调用的保存当前图的接口
        /// </summary>
        /// <returns></returns>
        public bool AssertSavaCanvasSuccessfully()
        {
            if (canvasCache.nodeCanvas is DefaultCanvas || !File.Exists(NodeEditorSaveManager.GetLastCanvasPath()))
            {
                return(true);
            }

            string path = canvasCache.nodeCanvas.savePath;

            //清理要删掉的Node
            foreach (var nodeForDelete in canvasCache.nodeCanvas.nodesForDelete)
            {
                //去除Node附带的端口
                foreach (var connectPort in nodeForDelete.connectionPorts)
                {
                    UnityEngine.Object.DestroyImmediate(connectPort, true);
                }
                UnityEngine.Object.DestroyImmediate(nodeForDelete, true);
            }

            canvasCache.nodeCanvas.nodesForDelete.Clear();

            if (!string.IsNullOrEmpty(path))
            {
                canvasCache.SaveNodeCanvas(path);
                ShowNotification(new GUIContent("Canvas Saved!"));
                Debug.Log($"{path}已保存成功");
                return(true);
            }
            else
            {
                Debug.LogError($"{path}保存失败,请先确保要覆盖的文件已存在!(尝试使用Save As创建目标文件)");
                ShowNotification(new GUIContent("No save location found. Use 'Save As'!"));
                return(false);
            }
        }