Advertisement
Guest User

Working Example

a guest
Jun 5th, 2016
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.06 KB | None | 0 0
  1.         PlayFabClientAPI.LoginWithCustomID(new LoginWithCustomIDRequest()
  2.         {
  3.             TitleId = PlayFabSettings.TitleId,
  4.             CreateAccount = true,
  5.             CustomId = SystemInfo.deviceUniqueIdentifier
  6.         }, (loginResult) =>
  7.         {
  8.  
  9.             PlayFabClientAPI.ExecuteCloudScript(new ExecuteCloudScriptRequest()
  10.             {
  11.                 FunctionName = "GetUserInfoWithID",
  12.                 FunctionParameter = new Dictionary<string, string>
  13.             {
  14.                 { "PlayerID", "11AABB1A88D63DC8" }
  15.             }
  16.             }, (result) =>
  17.             {
  18.                 var account = PlayFab.SimpleJson.DeserializeObject<JsonObject>(result.FunctionResult.ToString());
  19.                 var accountJson = account["UserInfo"].ToString();
  20.                 var accountInfo = PlayFab.SimpleJson.DeserializeObject<UserAccountInfo>(accountJson, Util.ApiSerializerStrategy);
  21.  
  22.                 Debug.Log("test");
  23.                 Debug.Log(accountInfo.PlayFabId);
  24.             }, HandlePlayFabError);
  25.  
  26.  
  27.         }, HandlePlayFabError);
  28.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement