Quantcast
Channel: Photon Unity Networking (PUN) — Photon Engine
Viewing all articles
Browse latest Browse all 8947

PhotonNetwork.time is not synchronized

$
0
0
I faced strange behavior:

PhotonNetwork.time is synchronized in proper way in Editor/Standalone build, but
when I run it under iOS devices PhotonNetwork.time is different from sever timestamps dramatically (millions)

What can cause this problem?

I am using PhotonServer on standalone machine and free PUN from asset store...

On iOS I got negative values.

Server time double: -1155847.248
Server time ms: -1155847248

Server time that I got via RPC is: 3137684
PhotonNetwork.FetchServerTimestamp() - does not help...

Very strange that it reproducible on iOS actual device only (not in editor/nor standalone build for win/mac)

BTW, in editor I got following:

Server time double: 3139752.208 (using PhotonNetwork.time)
Server time ms: -1155215088 (using PhotonNetwork.networkingPeer.ServerTimeInMilliSeconds)


I think the problem is near....

Somehow on iOS the following line in getter produce NEGATIVE value:

public static double time
{
...
return ((double)(uint)networkingPeer.ServerTimeInMilliSeconds) / 1000.0f;
...
}

Viewing all articles
Browse latest Browse all 8947

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>