docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface IQosService

    An interface that allows access to QoS measurements. Your game code should use this interface through QosService.Instance.

    Namespace: Unity.Services.Qos
    Assembly: Unity.Services.QoS.dll
    Syntax
    public interface IQosService

    Methods

    GetAllServersAsync()

    Query for all QoS servers associated with the authenticated player's projectID and environmentID.

    Declaration
    Task<IList<QosServer>> GetAllServersAsync()
    Returns
    Type Description
    Task<IList<QosServer>>

    Returns a list of tuples, each containing the input server and its corresponding QoS measurements.

    Remarks

    This endpoint returns a list of QoS server connection information, annotated with service-specific tags, that you can use to determine connection quality between a client and a given region. The annotations in the response can be used to filter out servers that are irrelevant to certain use-cases (e.g. filtering for Multiplay-only or Relay-only, by Matchmaker queue or fleet, etc.)

    GetQosResultsAsync(IList<QosServer>)

    Gets the QoS measurements associated with each given servers.

    Declaration
    Task<IList<(QosServer, IQosMeasurements)>> GetQosResultsAsync(IList<QosServer> servers)
    Parameters
    Type Name Description
    IList<QosServer> servers

    The list of QoS servers to measure.

    Returns
    Type Description
    Task<IList<(QosServer, IQosMeasurements)>>

    Returns a list of tuples, each containing the input server and its corresponding QoS measurements.

    Remarks

    No sorting or grouping is done. An empty list will be returned if one of the server is invalid.

    GetSortedMultiplayQosResultsAsync(IList<string>)

    Gets sorted QoS measurements for Multiplay service.

    Declaration
    Task<IList<IQosAnnotatedResult>> GetSortedMultiplayQosResultsAsync(IList<string> fleet)
    Parameters
    Type Name Description
    IList<string> fleet

    The fleet to query for QoS. GetSortedMultiplayQosResultsAsync only uses QoS servers in the regions of the fleet for measurements. At least one fleet ID must be passed

    Returns
    Type Description
    Task<IList<IQosAnnotatedResult>>

    Returns the sorted list of QoS results, ordered from best to worst.

    Remarks

    The fleet ID must be a valid Multiplay fleet ID.

    GetSortedQosResultsAsync(string, IList<string>)

    Gets sorted QoS measurements the specified service and regions.

    Declaration
    Task<IList<IQosResult>> GetSortedQosResultsAsync(string service, IList<string> regions)
    Parameters
    Type Name Description
    string service

    The service to query regions for QoS. GetSortedQosResultsAsync only uses measures regions configured for the specified service.

    IList<string> regions

    The regions to query for QoS. If not null or empty, GetSortedQosResultsAsync only uses regions in the intersection of the specified service and the specified regions for measurements.

    Returns
    Type Description
    Task<IList<IQosResult>>

    Returns the sorted list of QoS results, ordered from best to worst.

    Remarks

    GetSortedQosResultsAsync doesn't consider the returned regions until applying the services and regions filters.

    If you specify regions, it only includes those regions.

    GetSortedRelayQosResultsAsync(IList<string>)

    Gets sorted QoS measurements for Relay service.

    Declaration
    Task<IList<IQosAnnotatedResult>> GetSortedRelayQosResultsAsync(IList<string> regions)
    Parameters
    Type Name Description
    IList<string> regions

    The regions to query for QoS. If not null or empty, GetSortedRelayQosResultsAsync only uses the specified regions for measurements.

    Returns
    Type Description
    Task<IList<IQosAnnotatedResult>>

    Returns the sorted list of QoS results, ordered from best to worst.

    Remarks

    If you specify regions, it only includes those regions.

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)