public override async Task UpdatePlayerBase(string playerId, BaseDescription newDescription) { newDescription.isPersistant = true; var fileName = string.Format(baseFileNameFormat, playerId); var baseJson = JsonUtility.ToJson(newDescription); await basesContainer.UploadFile(baseJson, fileName); }
public override async Task UpdatePlayerBase(string playerId, BaseDescription newDescription) { newDescription.isPersistant = true; var filePath = GetPersistantPath(playerId); //CheckAndCreateFolder(filePath); var json = JsonUtility.ToJson(newDescription); // File.WriteAllText(filePath, json); using (var writer = new StreamWriter(filePath, false)) { await writer.WriteAsync(json); } }
public abstract Task UpdatePlayerBase(string playerId, BaseDescription newDescription);