public void SaveAndUploadSingleLevel(SteamWorkshop.SubmitItemCallBack onUploadComplete, Action onSaveComplete = null) { Action <LevelData> uploadOnFinishSaving = (levelData) => { if (onSaveComplete != null) { onSaveComplete(); } string levelDirectory = DataPersister.SavesPathDirectory + "/" + levelData.name + "/"; string levelImagePath = levelDirectory + levelData.name + ".png"; dataPersister.TrySaveLevelDataFile(levelDirectory, levelData); dataPersister.SaveSnapshotToFile(levelImagePath, levelData.imageData); SteamAdapter.GenerateFileIDAndUpload(levelDirectory, levelImagePath, levelData, onUploadComplete); }; SaveLevel(false, uploadOnFinishSaving); }
public void LoadSteamworkshopFiles(System.Action onLevelsLoadedExternal = null) { IsLevelsLoaded = false; this.onLevelsLoadedExternal = onLevelsLoadedExternal; SteamAdapter.LoadSteamLevelData(OnAllLevelsLoaded); }
public void SyncLevelData() { SteamAdapter.LoadSteamLevelData(); ClearAndGenerateLevelUI(); }