public void SaveMapAs() { if (m_cellArray == null) { return; } m_filePath = EditorUtility.SaveFilePanel("Save map file", Application.dataPath, "", "txt"); if (string.IsNullOrEmpty(m_filePath)) { return; } AStarMapStream.Write(ToMap(), m_filePath); Debug.Log("Save success."); }
public void AutoAStarMap() { if (cells == null) { return; } string filePath; filePath = EditorUtility.SaveFilePanel("Save map file", Application.dataPath, "", "txt"); if (string.IsNullOrEmpty(filePath)) { return; } AStarMap map = SpriteMap2AStarMap.SpriteMapToAStarMap(ToMapData()); AStarMapStream.Write(map, filePath); Debug.Log("AutoAStarMap success."); }
void MapCatch() { AStarMapStream.Write(ToMap(), Application.dataPath + "/MapCatch"); }