void SaveGraph() { if (_curFlowGraph != null) { if (_curSelectAsset == null) { string path = EditorUtility.SaveFilePanel( "Save flow graph as asset", sGraphFilePath, "Flow Graph.asset", "asset"); if (path.Length > 0) { _curAssetPath = sGraphFilePath + Path.GetFileName(path); _curSelectAsset = _curFlowGraph.Save(_curAssetPath, true); } } else { _curFlowGraph.Save(_curAssetPath, false); } AssetDatabase.SaveAssets(); AssetDatabase.Refresh(); } }
private void SaveGraph() { if (m_CurFlowGraph != null) { if (m_CurSelectAsset == null) { string path = EditorUtility.SaveFilePanel( "Save flow graph as asset", GRAPH_FILE_PATH, "Flow Graph.asset", "asset"); if (path.Length > 0) { m_CurAssetPath = GRAPH_FILE_PATH + Path.GetFileName(path); m_CurSelectAsset = m_CurFlowGraph.Save(m_CurAssetPath, true); } } else { m_CurFlowGraph.Save(m_CurAssetPath, false); } AssetDatabase.SaveAssets(); AssetDatabase.Refresh(); } }