ARares
1
I did this to can show the ping in the scoreboard for each player, but for all players the ping is 0:
And i get this warning: Trying to send command for object without authority.
[SyncVar]
public int playerPing = 0;
void Update()
{
CmdShowPing(); //Warning Here
}
[Command]
private void CmdShowPing()
{
if (NetworkManager.singleton != null)
{
playerPing = NetworkManager.singleton.client.GetRTT();
}
}
TwoTen
2
Only call the command if you have authority. (if hasAuthority)
ARares
3
ok, the warning is fixed, but the ping is always 0:

TwoTen
4
GetRTT is null on the server. You need to get the client connection that you want to measure
EDIT:
I meant the Client on the NetManager is null. Atleast So I think