question

jonathanq avatar image
jonathanq asked

UserInventory - Missing VirtualCurrency properties on return...

I'm calling to get my UserInventory but it seems to be missing the VirtualCurrency and VirtualCurrencyRechargeTimes properties.

All seems pretty straight forward, just not getting the results. What am I missing?

API call:

public void GetUserData()
{
PlayFabClientAPI.GetUserInventory(new GetUserInventoryRequest(), PlayerInventorySuccess, PlayerInventoryFailure);
}

Call results:

private void PlayerInventorySuccess(GetUserInventoryResult obj)
{
string result = JsonUtility.ToJson(obj, true);
Debug.Log(result);
}

Results:

{
    "Inventory": [
        {
            "Annotation": "Granted via Game Manager",
            "BundleContents": [],
            "BundleParent": "",
            "CatalogVersion": "default_catalog",
            "DisplayName": “Card Name",
            "ItemClass": "card_common",
            "ItemId": “super_cardItem",
            "ItemInstanceId": "E672DEEE28C15735",
            "UnitCurrency": "",
            "UnitPrice": 0
        }
    ]
} 

I tried using the PlayfabJson Serializer, just to see if there was anything being left off when converting the string, but received the same results.

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

·
brendan avatar image
brendan answered

Can you please provide the Title ID you're using, and the PlayFab ID of the player account you're querying?

2 comments
10 |1200

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

jonathanq avatar image jonathanq commented ·

Title: 2A23

Player: BFB3C62D6870CB9D

Thx -

0 Likes 0 ·
brendan avatar image brendan jonathanq commented ·

I just signed in as that user in your title using Postman (using the Custom ID on the account), and the response to Client/GetUserInventory contains both VirtualCurrency and VirtualCurrencyRechargeTimes. Can you try making the call in Postman, and have a look at the results?

0 Likes 0 ·

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.