void OpenSaveGraphWindow(object mousePositionObject) { Vector2 mousePosition = (Vector2)mousePositionObject; if (!data.CheckHasEntranceNode()) { EditorUtility.DisplayDialog("没有入口节点", "技能当中没有入口节点", "ok"); return; } try { int newGraphId = PersistenceTool.GetNewGraphId(); PopupWindow.Show(new Rect(mousePosition + position.position, new Vector2(500, 0)), new SaveGraphPopupWindow( newGraphId, (id, graphName, description) => { data.graphId = id; data.graphName = graphName; data.graphDescription = description; PersistenceTool.SaveGraph(data); })); } catch { } }
void SaveCurrentGraph(object mousePositionObject) { if (data.CheckHasEntranceNode()) { PersistenceTool.SaveGraph(data); } else { EditorUtility.DisplayDialog("没有入口节点", "技能当中没有入口节点", "ok"); } }