示例#1
0
        public static void PushToPlayFab(Rect position)
        {
            string datas = ConvertToJson(achievements);

            var updateRequest = new SetTitleDataRequest();

            updateRequest.Key   = "Achievements";
            updateRequest.Value = datas;
            PlayFabServerAPI.SetTitleData(updateRequest, (result) =>
            {
                //Debug.Log("Set titleData successful");
                Rect popupRect = new Rect(position.x - 200, position.y, 200, 80);
                PopUp newPopUp = new PopUp();
                newPopUp.Init("Datas Succesfully saved to PlayFab", popupRect);
            },
                                          (error) =>
            {
                Debug.Log("Got error setting titleData:");
                Debug.Log(error.ErrorMessage);
            });
        }