GetPing
Namespace: SynicSugar.P2P
Class: p2pInfo
public int GetPing(UserId id)
Description
Get the ping with a peer from cache.
The ping with a disconnected user is -1.
using UnityEngine;
using UnityEngine.UI;
using SynicSugar.P2P;
public class p2pSample : MonoBehaviour {
public Text ping;
public void DisplayPing(){
ping.text = $"{OwnerUserId}: {p2pInfo.Instance.GetPing(OwnerUserId)}";
}
}