Пример #1
0
 public void ConfirmModifyUserTitleName()
 {
     if (usernameNewValue.text.ToCharArray().Length < 4)
     {
         Inform("Username too short!");
         return;
     }
     else
     {
         PlayFabAdminAPI.UpdateUserTitleDisplayName(new UpdateUserTitleDisplayNameRequest {
             PlayFabId   = lastPlayerIdentifier.playerID,
             DisplayName = usernameNewValue.text
         },
                                                    result => {
             Debug.Log("UPDATE DISPLAY NAME OK: " + result.ToJson().ToString());
             Inform(string.Format("Successfully renamed {0} to {1}",
                                  lastPlayerIdentifier.displayName,
                                  usernameNewValue.text));
         },
                                                    error => {
             Debug.LogError("UPDATE NAME FAILURE: " + error.ToString());
             Inform("Unable to update name! " + error.ErrorMessage);
         });
     }
 }