Hi all,
I am using the latest Unity SDK, and when my player wants to log in, I'm calling this function:
public void Login(string Username, string Password) { GetPlayerCombinedInfoRequestParams paramters = new GetPlayerCombinedInfoRequestParams(){ GetPlayerProfile = true, GetTitleData = true, GetUserVirtualCurrency = true, GetUserInventory = true }; PlayFabClientAPI.LoginWithPlayFab(new LoginWithPlayFabRequest { Username = Username, Password = Password, InfoRequestParameters = paramters }, LoginSuccess, GetPlayFabError); }
On success, this then runs a login success function which contains:
if (Result.InfoResultPayload.TitleData.ContainsKey("XP")) { Data.Experience = Result.InfoResultPayload.TitleData["XP"]; } else { Data.Experience = "0"; CreateBasicUserData(); }
This is a test account I've been using, and for that account, the "XP" key is set. However the InfoRequestPayload.TitleData is empty, so using something like
Result.InfoResultPayload.TitleData.ToList().ForEach(x => Debug.Log(x.Key));
Returns nothing at all, and thus the else part of the login success gets executed, everytime.
The documentation states that this login method can be sent with a
- GetPlayerCombinedInfoRequestParams object called InfoRequestParameters, but I'm now thinking it doesnt actually work the way I think it does. Can anyone help me out?