Class NetworkTickSystem
Provides discretized time. This is useful for games that require ticks happening at regular interval on the server and clients.
Inherited Members
Namespace: Unity.Netcode
Assembly: solution.dll
Syntax
public class NetworkTickSystem
Constructors
Name | Description |
---|---|
NetworkTickSystem(uint, double, double) | Creates a new instance of the NetworkTickSystem class. |
Fields
Name | Description |
---|---|
NoTick | Special value to indicate "No tick information" |
Properties
Name | Description |
---|---|
LocalTime | The current local time. This is the time at which predicted or client authoritative objects move. This value is accurate when called in Update or during the Tick event but does not work correctly for FixedUpdate. |
ServerTime | The current server time. This value is mostly used for internal purposes and to interpolate state received from the server. This value is accurate when called in Update or during the Tick event but does not work correctly for FixedUpdate. |
TickRate | The TickRate of the tick system. This is used to decide how often a fixed network tick is run. |
Methods
Name | Description |
---|---|
Reset(double, double) | Resets the tick system to the given network time. |
UpdateTick(double, double) | Called after advancing the time system to run ticks based on the difference in time. |
Events
Name | Description |
---|---|
Tick | Gets invoked before every network tick. |