Class ClientWorldClock
The client's mirror of the world clock: adopts the scene server's anchor and reads it at FishNet's tick.
public sealed class ClientWorldClock
- Inheritance
-
ClientWorldClock
- Inherited Members
Remarks
Core, so the world's time exists on the client whatever world content is installed: the sky and the weather run on it, and so do the sea, a mill's sails and the modules' own clocks. Nothing here predicts or decides anything.
The anchor belongs to one server. It names a tick of the server it came from, and FishNet restarts the tick at 0 on a disconnect and counts the next server's ticks after — so a scene hop or a reconnect read the old server's anchor against the new server's tick, and the sky (and everything on the world's clock) was off by the two servers' difference in uptime, often days, until the new anchor came with the character. It is forgotten the moment the connection stops (Reset()); without one the clock is this machine's UTC, a fraction of a second out at most, and the next server's anchor arrives on spawn.
Methods
Initialize(NetworkManager)
public void Initialize(NetworkManager manager)
Parameters
managerNetworkManager
Reset()
Forgets the anchor: the connection to its server ended (see the remarks).
public void Reset()
Shutdown()
public void Shutdown()