Im trying to understand how to access information stored in an array.
We have recently looked at playfab and are just trying to work out how it all works as they have no c# or unity documentation its been a slight challenge.
This is what we are accessing
https://api.playfab.com/Documentation/Client/method/GetUserInventory
with the following script
public void GetInventoryList()
{
PlayFabClientAPI.GetUserInventory (new GetUserInventoryRequest (), OnGetUserInventoryRequest, OnPlayFabInventoryError);
}
public void OnGetUserInventoryRequest(GetUserInventoryResult result)
{
print (result.Inventory.Count);
print (result.Inventory.Capacity);
}
I know this is working as the .count tells me there is 5 which is how many items I have in this accounts inventory. Now im trying to access the items and what they are. Perhaps someone with better knowledge of how object arrays work can help me
This is what is stored in each object in the array
https://api.playfab.com/Documentation/Client/datatype/WebAPIModels/PlayFab.WebAPIModels.Inventory.ItemInstance?MarkOptionalProperties=False
Thanks