Hi, I'm new to PlayFab and has followed the "Get Started with Unity" guide, but I'm getting errors when running the code. The error is as follows:
{"code":200,"status":"OK","data":{"SessionTicket":"73AC88AC45D574A9---433A-8D3A8DB10F04D4E-39600EF6B598712C.9FDC35E861D87386","PlayFabId":"73AC88AC45D574A9","NewlyCreated":false,"SettingsForUser":{"NeedsAttribution":false},"LastLoginTime":"2016-07-10T15:57:20.652Z"}}
I have checked the "Players" section in the PlayFab console and I am able to see the login activities, just want to find out why I am getting the error message. Thanks!
Here is my code:
using UnityEngine; using System.Collections; using System.Collections.Generic; using PlayFab; using PlayFab.ClientModels; public class PlayfabManager : MonoBehaviour { public static PlayfabManager instance; public string PlayFabId; void Awake(){ instance = this; //Setup Playfab ID PlayFabSettings.TitleId = "XXXX"; //Replaced real TitleId with XXXX } void Start(){ Login (PlayFabSettings.TitleId); } void Login(string titleId) { LoginWithCustomIDRequest request = new LoginWithCustomIDRequest() { TitleId = titleId, CreateAccount = true, CustomId = SystemInfo.deviceUniqueIdentifier }; PlayFabClientAPI.LoginWithCustomID(request, (result) => { PlayFabId = result.PlayFabId; Debug.Log("Got PlayFabID: " + PlayFabId); if(result.NewlyCreated) { Debug.Log("(new account)"); } else { Debug.Log("(existing account)"); } }, (error) => { Debug.Log("Error logging in player with custom ID:"); Debug.Log(error.ErrorMessage); }); },
Hi, I'm new to PlayFab and have followed the "Get Started with Unity" guide to login with custom ID, but I'm getting the following error in my log:
{"code":200,"status":"OK","data":{"SessionTicket":"73AC88AC45D574A9---433A-8D3A8DB10F04D4E-39600EF6B598712C.9FDC35E861D87386","PlayFabId":"73AC88AC45D574A9","NewlyCreated":false,"SettingsForUser":{"NeedsAttribution":false},"LastLoginTime":"2016-07-10T15:57:20.652Z"}}
I have checked the "Players" tab in the Playfab console and I can see all the login details of the test attempts, just want to find out why it is showing as an error in Unity. Thanks!
Here's my code:
using UnityEngine; using System.Collections; using System.Collections.Generic; using PlayFab; using PlayFab.ClientModels; public class PlayfabManager : MonoBehaviour { public static PlayfabManager instance; public string PlayFabId; void Awake(){ instance = this; //Setup Playfab ID PlayFabSettings.TitleId = "XXXX"; //Replaced real TitleId with XXXX } void Start(){ Login (PlayFabSettings.TitleId); } void Login(string titleId) { LoginWithCustomIDRequest request = new LoginWithCustomIDRequest() { TitleId = titleId, CreateAccount = true, CustomId = SystemInfo.deviceUniqueIdentifier }; PlayFabClientAPI.LoginWithCustomID(request, (result) => { PlayFabId = result.PlayFabId; Debug.Log("Got PlayFabID: " + PlayFabId); if(result.NewlyCreated) { Debug.Log("(new account)"); } else { Debug.Log("(existing account)"); } }, (error) => { Debug.Log("Error logging in player with custom ID:"); Debug.Log(error.ErrorMessage); }); }