Nebula
Core

HistoricalState

What an entity looked like at one recorded server tick: the answer of NetworkIdentity.StateAt.

generated from the sources
public readonly struct HistoricalState

What an entity looked like at one recorded server tick: the answer of NetworkIdentity.StateAt. Check Available first; every other member is meaningless when it is false. Tick is the tick the entry was actually recorded for, which is the asked-for tick unless it fell in a gap (see StateHistory.GapToleranceTicks).

Properties

Available

public bool Available { get; }

True when an entry was found; false means "unavailable", never an extrapolation.

Tick

public uint Tick { get; }

The server tick this entry belongs to.

Position

public Vector3 Position { get; }

World position at Tick.

Rotation

public Quaternion Rotation { get; }

World rotation at Tick.

Velocity

public Vector3 Velocity { get; }

World-space linear velocity as the authority reported it at Tick.

Container

public Container Container { get; }

The container the entity was in at Tick (null: outside every container).

Epoch

public uint Epoch { get; }

The entity's authority epoch at Tick.

FromAuthority

public bool FromAuthority { get; }

True when this worker recorded the entry as the authority (after that tick's simulation), false when it recorded it as a ghost holder from the owner's stream. A ghost entry is one tick behind the owner in availability, never in the tick it is tagged with; see docs/state-history.md §4.

Methods

TryGetValue

public bool TryGetValue<T>(NetworkVariable<T> variable, out T value);

The value variable held at Tick. False when the variable does not carry SyncHistoryAttribute, belongs to another entity, or nothing was snapshotted for this entry.

ToString

public override string ToString();

On this page