docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class QosService

    Provides an entry point to the QoS Service, enabling clients to measure the quality of service (QoS) in terms of latency and packet loss for various regions.

    Inheritance
    object
    QosService
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.Services.Qos
    Assembly: Unity.Services.QoS.dll
    Syntax
    public static class QosService
    Examples
    using System;
    using Unity.Services.Authentication;
    using Unity.Services.Core;
    using Unity.Services.Qos;
    using UnityEngine;
    
    namespace MyPackage
    {
        public class MySample : MonoBehaviour
        {
            public async void RunQos()
            {
                try
                {
                    await UnityServices.InitializeAsync();
                    await AuthenticationService.Instance.SignInAnonymouslyAsync();
                    var serviceName = "multiplay";
                    var qosResults = await QosService.Instance.GetSortedQosResultsAsync(serviceName, null);
                }
                catch (Exception e)
                {
                    Debug.Log(e);
                }
            }
        }
    }

    Properties

    Instance

    A static instance of the QoS Service.

    Declaration
    public static IQosService Instance { get; }
    Property Value
    Type Description
    IQosService
    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)