Quantcast
Channel: Recent Discussions — Photon Engine
Viewing all articles
Browse latest Browse all 15755

Regions Ping Always 0

$
0
0
I'm connecting to the NameServer to get a list of all severs and list it to the player with each current ping, but the ping value that i get is always 0.

public override void Show(bool p_show)
{
foreach (Region __region in PhotonNetwork.networkingPeer.AvailableRegions)
{
RegionBar __regionBar = Instantiate(regionBarPrefab);

__regionBar.regionLabel.text = __region.Code.ToString();
__regionBar.pingLabel.text = "Ping: " + __region.Ping; //Always 0
__regionBar.region = __region;

__regionBar.transform.SetParent(regionBarGrid.transform);

_regionBars.Add(__regionBar);
}

base.Show(p_show);

_displaying = true;
}

void Update()
{
if (!_displaying)
return;

foreach (RegionBar __regionBar in _regionBars)
{
__regionBar.pingLabel.text = "Ping: " + __regionBar.region.Ping; //Always 0
}
}
What am i doing wrong, do i have to manually send a ping command ? If so, how do i do this ?

Viewing all articles
Browse latest Browse all 15755

Trending Articles