Search Unity

Resolved Get QoS RegionId and Name for matchmaking

Discussion in 'Matchmaker' started by kjuanlu_aim2, Jan 31, 2023.

  1. kjuanlu_aim2

    kjuanlu_aim2

    Joined:
    Nov 29, 2021
    Posts:
    12
    Hello all.

    I'm using de QoS service to get the best region for the client to connect trought matchmaking.
    I'm using QosService.Instance.GetSortedQosResultsAsync, but the id's doesnt match with my fleets.

    GetSortedQosResultsAsync has an argument to specify the list of regions, but in the documentation says that it's not the scope of the example:
    upload_2023-1-31_11-36-49.png

    The matchmaking documentation uses an alternative way of retrieve the QoS results using your fleet id:
    https://docs.unity.com/matchmaker/en/manual/quality-of-service#Retrieve_QoS_results
    It uses the url $"https://multiplay.services.api.unity.com/v1/fleets/{fleetId}/qos-regions";

    I'm not sure how to do, with the QosService API or using the http get petition.

    I only need to know what is the best region, to create the matchmaking ticket (I'm not sure how to make rules for this purpose, because the documentation talks about min or max ping average, maybe a custom rule with the region name...)

    Can you give me an advice to go in the desired direction? Thanks in advance.
     
  2. kjuanlu_aim2

    kjuanlu_aim2

    Joined:
    Nov 29, 2021
    Posts:
    12
  3. kjuanlu_aim2

    kjuanlu_aim2

    Joined:
    Nov 29, 2021
    Posts:
    12
    I noticed that QosServices.GetSortedQosResultsAsync sometimes crashes with "JobTempAlloc has allocations that are more than 4 frames old", any idea how to sovle it?