コード例 #1
0
ファイル: SteamDataLibrary.cs プロジェクト: yjaenike/IGD2021
 /// <summary>
 /// Loads the data from a given address
 /// Note that the load operation will only establish the result as the active data if its prefix matches
 /// </summary>
 /// <param name="address"></param>
 /// <returns></returns>
 public void Load(SteamworksRemoteStorageManager.FileAddress address)
 {
     if (!string.IsNullOrEmpty(address.fileName) && address.fileName.StartsWith(filePrefix))
     {
         activeFile = SteamworksRemoteStorageManager.FileReadSteamDataFile(address);
         activeFile.WriteToLibrary(this);
     }
 }
コード例 #2
0
ファイル: SteamDataLibrary.cs プロジェクト: yjaenike/IGD2021
 /// <summary>
 /// Loads the data from a given address
 /// Note that the load operation will only establish the result as the active data if its prefix matches
 /// </summary>
 /// <param name="address"></param>
 /// <returns></returns>
 public void LoadAsync(SteamworksRemoteStorageManager.FileAddress address)
 {
     if (!string.IsNullOrEmpty(address.fileName) && address.fileName.StartsWith(filePrefix))
     {
         var nDataFile = SteamworksRemoteStorageManager.FileReadAsync(address);
         if (nDataFile.result != Steamworks.EResult.k_EResultFail)
         {
             nDataFile.Complete = results =>
             {
                 activeFile = results;
                 activeFile.WriteToLibrary(this);
             };
         }
     }
 }