Making the following requests generates a null reference exception in the Playfab code:
string gender = "somevalue"; string birthday = "somevalue"; var req = new UpdateUserDataRequest { Data = { { "gender", gender }, { "birthday", birthday } } }; PlayFabClientAPI.UpdateUserData(req, OnUserDataUpdated, OnRegisterFailure);
And trying to fetch the data (after logging in) also generates an error:
PlayFabClientAPI.GetUserData(new GetUserDataRequest { Keys = { "gender", "birthday" } }, OnGetUserData, OnPlayfabError);
Error:
NullReferenceException: Object reference not set to an instance of an object MapUI.OnGetAccountInfo (PlayFab.ClientModels.GetAccountInfoResult result) (at Assets/UI/Scripts/MapUI.cs:135) PlayFab.Internal.PlayFabHttp+<>c__DisplayClass23_0`1[TResult].<_MakeApiCall>b__1 () (at Assets/PlayFabSDK/Shared/Internal/PlayFabHttp/PlayFabHTTP.cs:215) PlayFab.Internal.PlayFabUnityHttp.OnResponse (System.String response, PlayFab.Internal.CallRequestContainer reqContainer) (at Assets/PlayFabSDK/Shared/Internal/PlayFabHttp/PlayFabUnityHttp.cs:247) UnityEngine.Debug:LogException(Exception) PlayFab.Internal.PlayFabUnityHttp:OnResponse(String, CallRequestContainer) (at Assets/PlayFabSDK/Shared/Internal/PlayFabHttp/PlayFabUnityHttp.cs:251) PlayFab.Internal.<Post>d__12:MoveNext() (at Assets/PlayFabSDK/Shared/Internal/PlayFabHttp/PlayFabUnityHttp.cs:198) UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr) (at /Users/builduser/buildslave/unity/build/Runtime/Export/Scripting/Coroutines.cs:17)
I am using Unity 2019.4.0f1 and the latest version of the Playfab SDK (2.102.210111).
Other requests seem to work except for these two regarding user data.