Hi all
I'm trying out the matchmaking using unity SDK
my flow is as follows
private async Task DoQueueAsync() { var request = new CreateMatchmakingTicketRequest { Creator = new MatchmakingPlayer { Entity = new EntityKey { Id = LoginPlayfab.LoginResult.EntityToken.Entity.Id, Type = LoginPlayfab.LoginResult.EntityToken.Entity.Type } }, GiveUpAfterSeconds = 10, QueueName = "myqueue" }; var response = await PlayFabExtension.Run<CreateMatchmakingTicketRequest, CreateMatchmakingTicketResult>( (r, o, e, c, h) => PlayFabMultiplayerAPI.CreateMatchmakingTicket(r, o, e), request); StartCoroutine(CheckMatched(response.TicketId)); } private IEnumerator CheckMatched(string ticketId) { int count = 0; while (PreformCheckMatchedAsync(ticketId).Result == false || count < 5) { count++; yield return new WaitForSeconds(6); } } private async Task<bool> PreformCheckMatchedAsync(string ticketId) { var request = new GetMatchmakingTicketRequest { TicketId = ticketId, QueueName = "myqueue", EscapeObject = true }; var response = await PlayFabExtension.Run<GetMatchmakingTicketRequest, GetMatchmakingTicketResult>( (r, o, e, c, h) => PlayFabMultiplayerAPI.GetMatchmakingTicket(r, o, e), request); return response.Status == "Matched"; }
CreateMatchmakingTicketRequest call works and return a response.
but when I reach the GetMatchmakingTicketRequest the app gets stuck and I don't get any response nor timeout
what am I doing wrong?
thanks in advance