question

Adnane Elkabraoui avatar image
Adnane Elkabraoui asked

Error PlayFabClientAPI

Hello, any help please to solve this problem?

Exception: Must be logged in to call this method PlayFab.PlayFabClientAPI.UpdateUserData (PlayFab.ClientModels.UpdateUserDataRequest request, PlayFab.ProcessApiCallback`1 resultCallback, PlayFab.ErrorCallback errorCallback, System.Object customData) (at Assets/PlayFabSDK/Public/PlayFabClientAPI.cs:1140)

capture.jpg (311.0 KiB)
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Sarah Zhang avatar image
Sarah Zhang answered

This exception means the client hasn’t logged in successfully before it calls the UpdateUserData API. PlayFab Unity SDK implements with asynchronous methods. So please make sure the call of UpdateUserData API is in the OnLoginSuccess call back function or is controlled by a bool flag thatin this callback function. You can refer to this sample Making your first API call to modify the code.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.