private void ReadAndWrite(string name)
        {
            var client = AN_Games.GetSnapshotsClient();

            client.Open(name, m_createIfNotFound, m_conflictPolicy, (result) => {
                if (result.IsSucceeded)
                {
                    AN_Logger.Log("We have snapshot, reading data...");
                    AN_Snapshot snapshot = result.Data.GetSnapshot();

                    byte[] data = snapshot.ReadFully();

                    var meta     = snapshot.GetMetadata();
                    m_progress   = meta.ProgressValue + 10;
                    m_playedTime = meta.PlayedTime + 100;


                    string base64Text = Convert.ToBase64String(data);
                    AN_Logger.Log("Snapshot data: " + base64Text);
                    PrintSnapshotMetadata(snapshot.GetMetadata());


                    AN_Logger.Log("Writing data...");

                    m_snpashotData = "My game data " + name;
                    data           = m_snpashotData.ToBytes();

                    snapshot.WriteBytes(data);


                    SA_ScreenUtil.TakeScreenshot(512, (screenshot) => {
                        var changeBuilder = new AN_SnapshotMetadataChange.Builder();
                        changeBuilder.SetDescription("Hello Description");
                        changeBuilder.SetPlayedTimeMillis(m_playedTime);
                        changeBuilder.SetProgressValue(m_progress);
                        changeBuilder.SetCoverImage(screenshot);

                        AN_SnapshotMetadataChange changes = changeBuilder.Build();
                        client.CommitAndClose(snapshot, changes, (commitResult) => {
                            if (commitResult.IsSucceeded)
                            {
                                PrintSnapshotMetadata(commitResult.Metadata);
                                VerifySnapshotsSave(name);
                            }
                            else
                            {
                                SetAPIResult(result);
                            }
                        });
                    });
                }
                else
                {
                    SetAPIResult(result);
                }
            });
        }
    private void OpenSnapshot(string name)
    {
        var client = AN_Games.GetSnapshotsClient();

        bool createIfNotFound = true;
        var  conflictPolicy   = AN_SnapshotsClient.ResolutionPolicy.LAST_KNOWN_GOOD;

        client.Open(name, createIfNotFound, conflictPolicy, (result) => {
            if (result.IsSucceeded)
            {
                Debug.Log("We have snapshot, reading data...");
                AN_Snapshot snapshot = result.Data;

                byte[] data = snapshot.ReadFully();

                long progress     = snapshot.GetMetadata().ProgressValue;
                string base64Text = Convert.ToBase64String(data);
                Debug.Log("Snapshot data: " + base64Text);
                Debug.Log("Snapshot progress: " + snapshot.GetMetadata().ProgressValue);
                Debug.Log("Snapshot played time: " + snapshot.GetMetadata().PlayedTime);


                Debug.Log("Writing data...");

                string mydata = "My game data";
                data          = mydata.ToBytes();

                snapshot.WriteBytes(data);

                SA_ScreenUtil.TakeScreenshot(512, (screenshot) => {
                    var changeBuilder = new AN_SnapshotMetadataChange.Builder();
                    changeBuilder.SetDescription("Hello Description");
                    changeBuilder.SetPlayedTimeMillis(10000);
                    changeBuilder.SetProgressValue(progress + 1);
                    changeBuilder.SetCoverImage(screenshot);

                    AN_SnapshotMetadataChange changes = changeBuilder.Build();
                    client.CommitAndClose(snapshot, changes, (commitResult) => {
                        if (commitResult.IsSucceeded)
                        {
                            PrintMeta(commitResult.Metadata);
                        }
                        else
                        {
                            Debug.Log("CommitAndClose Snapshots Failed: " + result.Error.FullMessage);
                        }
                    });
                });
            }
            else
            {
                Debug.Log("Open Snapshots Failed: " + result.Error.FullMessage);
            }
        });
    }