When calling any of the Login methods (ie. LoginWithCustomID) with CreateAccount set to true and InfoRequestParameters.GetPlayerProfile set to true and this is the first login for the device the call is successful and returns a valid PlayFabId, SessionTicket, but the result.InfoResultPayload.PlayerProfile is NULL.
If this same code is called but the CustomId is already registered, the PlayerProfile is returned.
I would expect the newly created player profile to be returned when the Login call is used to create the account.
Answer by Andy · Mar 17, 2019 at 02:52 AM
I'm not sure whether this is by design or a bug. I could see an argument for both. I do agree that it would be more convenient if it did return the just-created profile. I'll raise it with the appropriate team and see what they say.
Thanks Andy. I looked through the documentation and wasn't able to find anything that would imply the profile shouldn't be returned.
Actually yes. The team decided this is too risky to change (there's an order of operations problem with regard to when the profile actually exists, empty or not). Instead, they're updating the documentation to reflect the current behavior.
Answer by vietdungdev · Apr 04 at 11:34 AM
//temp fix private void OnPlayfabAuthComplete(LoginResult result) { if (result.InfoResultPayload.PlayerProfile == null) { //create new account need once more login AutoLogin(); return; } //abcxyz }