Struct NetworkTime
A struct to represent a point of time in a networked game. Time is stored as a combination of amount of passed ticks + a duration offset. This struct is meant to replace the Unity Time API for multiplayer gameplay.
Inherited Members
Namespace: Unity.Netcode
Assembly: solution.dll
Syntax
public struct NetworkTime
Constructors
Name | Description |
---|---|
Network |
Creates a new instance of the Network |
Network |
Creates a new instance of the Network |
Network |
Creates a new instance of the Network |
Properties
Name | Description |
---|---|
Fixed |
Gets the fixed delta time. This value is based on the Tick |
Fixed |
Gets he current fixed network time. This is the time value of the last network tick. Similar to fixed |
Tick | Gets the amount of network ticks which have passed until reaching the current time value. |
Tick |
Gets the amount of time which has passed since the last network tick. |
Tick |
Gets the tickrate of the system of this Network |
Time | Gets the current time. This is a non fixed time value and similar to time. |
Time |
Gets the current time as a float. |
Methods
Name | Description |
---|---|
Time |
Returns the time a number of ticks in the past. |
To |
Converts the network time into a fixed time value. |
Operators
Name | Description |
---|---|
operator +(Network |
Computes the time a number of seconds later |
operator +(Network |
Computes the sum of two times |
operator -(Network |
Computes the time a number of seconds before |
operator -(Network |
Computes the time difference between two ticks |