Я могу войти в систему и открыть таблицу лидеров, но при сохранении и загрузке в облаке SavedGameRequestStatus
возвращает InternalError в методе SaveGameOpened
.
Я использую последнюю версию PlayGameServices. Я включил сохранение игр в консоли.
void AuthenticateUser()
{
PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder()
.EnableSavedGames().Build();
PlayGamesPlatform.DebugLogEnabled = false;
PlayGamesPlatform.InitializeInstance(config);
PlayGamesPlatform.Activate();
}
void OpenSave(bool saving)
{
Debug.Log("Open Save");
if (Social.localUser.authenticated)
{
issaving = saving;
((PlayGamesPlatform)Social.Active).SavedGame.OpenWithAutomaticConflictResolution(
saveName,
DataSource.ReadCacheOrNetwork,ConflictResolutionStrategy.UseLongestPlaytime,
SaveGameOpened
);
}
}
void SaveGameOpened(SavedGameRequestStatus status, ISavedGameMetadata meta)
{
Debug.Log("SaveGameOpened");
if (status == SavedGameRequestStatus.Success)
{
if (issaving) //write
{
byte[] data = System.Text.ASCIIEncoding.ASCII.GetBytes("test data");
SavedGameMetadataUpdate update = new SavedGameMetadataUpdate.Builder()
.WithUpdatedDescription("saved at" + DateTime.Now.ToString()).Build();
((PlayGamesPlatform)Social.Active).SavedGame
.CommitUpdate(meta,update,data,SaveUpdate);
}
else // read
{
((PlayGamesPlatform)Social.Active).SavedGame.ReadBinaryData(meta, SaveRead);
}
}
else
{
Debug.Log("SaveGameOpened Error Status = " + status);
}
}