Skip to content

Server time incorrect on client if the Tick Rates are different  #1503

Closed
@JohnConbere

Description

@JohnConbere

Describe the bug
If you have the NetworkManager.TickRate set to different values on the client and server the NetworkManager.ServerTime value is incorrect. For example, if you set the Server Tick rate to 30 and the Client Tick rate to 5, the servertime on the client will be reported to be 6x what is on the server.

To Reproduce
Steps to reproduce the behavior:

  1. Create a server and client application
  2. Set the server tick rate to 30
  3. Set the client tick rate to 5
  4. Run
  5. Check the NetworkManager.ServerTime variable.

Actual outcome
The NetworkManager.ServerTime variable on the client reports 6x what the NetworkManager.ServerTime is on the server.

Expected outcome
The NetworkManager.ServerTime on the client and server are sync'd

Environment (please complete the following information):
Unity 2020.3.21
com.unity.netcode.gameobjects -> develop branch commit(c3ca7cb)
UnityTransport : Version 1.0.0-pre.10 - December 03, 2021

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions