コード例 #1
0
    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);
    }
コード例 #2
0
 public void LoadSteamworkshopFiles(System.Action onLevelsLoadedExternal = null)
 {
     IsLevelsLoaded = false;
     this.onLevelsLoadedExternal = onLevelsLoadedExternal;
     SteamAdapter.LoadSteamLevelData(OnAllLevelsLoaded);
 }
コード例 #3
0
 public void SyncLevelData()
 {
     SteamAdapter.LoadSteamLevelData();
     ClearAndGenerateLevelUI();
 }