docs.unity3d.com
    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.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Unity.Services.Qos
    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
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023