I have been searching everywhere and cant find any example of using continuationtoken for unity c#.
Also playfab unity scene example is using economy v1.
Here is a code example you may refer to:
public void Test()
{
PlayFabClientAPI.LoginWithCustomID(new LoginWithCustomIDRequest
{
CustomId = "test"
}, re =>
{
Debug.Log("LoginSuccess");
PlayFabEconomyAPI.SearchItems(new PlayFab.EconomyModels.SearchItemsRequest
{
}, result =>
{
Debug.Log(result.ContinuationToken);
//You may process the Items from the result at here
SearchItemLoop(result.ContinuationToken);
}, error =>
{
Debug.Log(error.GenerateErrorReport());
});
}, er =>
{
Debug.Log(er.GenerateErrorReport());
});
}
public void SearchItemLoop(string continuationToken)
{
if (continuationToken != null)
{
PlayFabEconomyAPI.SearchItems(new PlayFab.EconomyModels.SearchItemsRequest
{
ContinuationToken = continuationToken
}, result =>
{
Debug.Log(result.ContinuationToken);
//You may process the Items from the result at here
SearchItemLoop(result.ContinuationToken);
}, error =>
{
Debug.Log(error.GenerateErrorReport());
}) ;
}
else
{
Debug.Log("Finish");
}
}
2 People are following this question.