Sending information of objects (Day/Night Cycle)
Options
Comments
-
One simple way could be to use PhotonNetwork.time, which I believe is synchronized across the network.0
-
Please share simple code?!!!!
Thankkksss..!0 -
All clients know the server's timestamp. If you set a room property that contains the server's timestamp when the initial morning began in this room, any client can compute the current day-cycle by knowing the length of it.
Let's say: day and night each take 5 minutes. The timestamp says "morning started 5minutes ago in this room, based on the server's timestamp then and yours now", then it's about to become night.
Don't have code but look at Room class and SetProperties and PhotonNetwork.time0 -
I understand the logic, but I'm at a good time with this problem.
I saved the time of creation of the room SetProperties, called a file. PHP I returned the server time.
But still can not get the other users have synchronized the cycle.
Please help me
Thanks.0 -
You want to synchronize the day/night cycle for all clients via an external PHP webpage?
Or do you just want to sync time in a single room (basically time since room started)?0