public void SaveMap() { EditorMapData mapData = tileManager.RegenerateMapData(); MapEditorUtility.SaveMap(editedMapName, mapData); creatorManager.UpdateSavedMap(referenceSaveData); mapEditorMenu.ShowMessage(); }
public void CreateMap(string name, int width, int height) { MapEditorSaveData data = new MapEditorSaveData(); data.mapName = name; data.width = width; data.height = height; string currentTime = DateTime.Now.ToString("yyyyMMddHHmmss"); data.saveName = name + "_" + currentTime + ".json"; data.modifiedTimeStamp = currentTime; data.createdDate = DateTime.Now.ToString("yyyy-MM-dd"); data.modifiedDate = data.createdDate; savedMaps.Add(data); SaveMaps(); //Create default map and save it with the save name EditorMapData basicMap = MapEditorUtility.CreateDefaultMap(data); MapEditorUtility.SaveMap(data.saveName, basicMap); DisplaySavedMaps(); }