Hello, I want to execute function after two requests are done. What's the best way to recognize both requests are done and how to call a function after this recognition? In code it looks like this:
public void ShowItems()<br>{ PlayFabClientAPI.GetCatalogItems(request1, CISuccess, CIFailure); PlayFabClientAPI.GetUserReadOnlyData(request2, UDSuccess, UDFailure);<br>} private void CISuccess(GetCatalogItemsResult result)<br>{ //DO SOME STUFF BASED ON RESULT AND SAVE VALUES TO VARIABLE DATA1 var DATA1;<br>} private void UDSuccess(GetUserDataResult result)<br>{ //DO SOME STUFF BASED ON RESULT AND SAVE VALUES TO VARIABLE DATA2 var DATA2;<br>} //CALL THIS WHEN BOTH REQUESTS ARE DONE private void DrawItems()<br>{ //DRAW ITEMS USING DATA1 AND DATA2 VALUES<br>}
I'm using Unity with C#. Thanks.