/// <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); } }
/// <summary> /// Loads the data for the current active file if any /// Note that this will overwrite the data current stored in the library /// </summary> /// <returns>True if the operation completed, false if skiped such as for a blank active file</returns> public void Load() { if (activeFile != null) { activeFile = SteamworksRemoteStorageManager.FileReadSteamDataFile(activeFile.address); activeFile.WriteToLibrary(this); } }
/// <summary> /// Loads the data for the current active file if any /// Note that this will overwrite the data current stored in the library /// </summary> /// <returns>True if the operation completed, false if skiped such as for a blank active file</returns> public void LoadAsync() { if (activeFile != null) { SteamworksRemoteStorageManager.FileReadAsync(activeFile.address).Complete = results => { activeFile = results; activeFile.WriteToLibrary(this); }; } }
/// <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); }; } } }