I am using Unity SDK 2.89.2000629. I am calling:
PlayFabClientAPI.LoginWithIOSDeviceID (PfRequests.LoginIosRequest, OnLoginSuccess, ErrorOccured);
With the PfRequests.LoginIooRequest set to:
LoginIosRequest = new LoginWithIOSDeviceIDRequest { CreateAccount = true, DeviceId = SystemInfo.deviceUniqueIdentifier, DeviceModel = SystemInfo.deviceModel, InfoRequestParameters = CombineInfoParams, OS = SystemInfo.operatingSystem, TitleId = PlayFabSettings.TitleId };
And with CombineInfoParms:
CombineInfoParams = new GetPlayerCombinedInfoRequestParams { GetCharacterInventories = false, GetCharacterList = false, GetPlayerProfile = true, GetPlayerStatistics = true, GetTitleData = true, GetUserAccountInfo = true, GetUserData = true, GetUserInventory = true, GetUserReadOnlyData = true, GetUserVirtualCurrency = true, PlayerStatisticNames = null, ProfileConstraints = null, TitleDataKeys = new List<string>{/*list removed for brevity*/}, UserDataKeys = new List<string>{/*list removed for brevity*/}, UserReadOnlyDataKeys = new List<string>{/*list removed for brevity*/}, };
I am noticing a couple of things:
1. The returned GetPlayerCombinedInfoResultPayload does not contain UserVirtualCurrency
2. Of the 7 items, my test player purchased 3 correctly show the UnitCurrency and UnitPrice. The other four UnitCurrency is blank and UnitPrice is 0. Checking the catalog all the items are defined with UnitPirce and UnitCurrency set the same.
My questions:
1. What do I need to do to get the UserVirtualCurrency from the login call?
2. Should I be concerned that the unit price and unit currency are not always being reported correctly? When I purchased the items the purchase seemed to work normally and the payer virtual currency was reduced correctly for all the items purchased.
Found the issues with the UserVirtualCurrency, my bad. I forgot dictionaries do not show in serialized objects and I serialized the value before I looked at it. I will need to fix that. As for some of the items having unit currency/price and others not, I still don't understand it and I am worried that it is showing off a problem.
Answer by Sarah Zhang · Jul 13, 2020 at 02:24 PM
Did you grant the items via Game Manager? In the testing, the items granted via Game Manager won't show the UnitCurrency and UnitPrice.
Player data limit 1 Answer
Custom data from the catalog item is not returned correctly. 1 Answer
I have an existing Java backend with user data stored in MYSQL, want to move that data to PlayFab. 1 Answer
Photon Disconnecton & Error Logs 2 Answers
Can I export all Player and Character data (e.g. Inventory, Virtual Currency, etc) 2 Answers