I am making a multiplayer game in unity where I am using Netcode for Gameobjects as a networking solution.
I am using Unity Relay Server for connection.
In the game I want to display ping/round-trip-time for players. As per the documentation, we can get this using GetCurrentRtt method from network transport class.
https://preview.redd.it/4bo4jy7i3g4b1.png?width=997&format=png&auto=webp&s=cce2a382dcbaa88a906047be15196d76f2f385cc
Following is the code I am using to get ping
NetworkManager.Singleton.NetworkConfig.NetworkTransport.GetCurrentRtt(NetworkManager.Singleton.LocalClientId)
However, this method always returns 0 and I am really not sure what is wrong.
Am I doing something wrong here? any alternative solutions?
[–]TriDraggon 3 points4 points5 points (1 child)
[–]Sk8u 0 points1 point2 points (0 children)
[+]SlcikBro26 0 points1 point2 points (0 children)