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.
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 |