NetworkTime
Provides the shared 60 Hz simulation tick.
Nebula · Packages/com.1by3.nebula/Runtime/Core/NetworkTime.cspublic static class NetworkTimeProvides the shared 60 Hz simulation tick. Each worker calculates its tick from the wall clock and a fixed origin, so workers agree without a coordinating process. Use tick numbers rather than wall-clock timestamps in gameplay simulation.
Fields
TickRate
public const int TickRate = 60;TickInterval
public const float TickInterval = 1f / TickRate;Properties
DerivedTick
public static uint DerivedTick { get; }The tick the wall clock says it is right now.
DerivedTickExact
public static double DerivedTickExact { get; }Tick
public static uint Tick { get; }The tick currently being simulated. On a worker this is the authoritative simulation tick. On a client it is the tick the local player is predicting (ahead of the server by the input lead).
LatestServerTick
public static uint LatestServerTick { get; }Latest server tick the client has heard about (client only).
RenderTick
public static double RenderTick { get; }The (fractional) tick non-authoritative copies are presenting right now: on a client a few ticks behind the newest snapshot (InterpolationDelayTicks), on a worker one tick behind the simulation tick for ghosts. Buffered interpolators sample at this tick.
Methods
TicksToSeconds
public static float TicksToSeconds(uint ticks);