Nebula
Core

SyncHistoryAttribute

Marks a NetworkVariable<T> field as part of the entity's recorded state history, so its value is snapshotted every tick alongside the pose and can be read back through NetworkIdentity.StateAt / HistoricalState.TryGetValue<T>.

generated from the sources
[AttributeUsage(AttributeTargets.Field, Inherited = true, AllowMultiple = false)]
public sealed class SyncHistoryAttribute : Attribute

Marks a NetworkVariable<T> field as part of the entity's recorded state history, so its value is snapshotted every tick alongside the pose and can be read back through NetworkIdentity.StateAt / HistoricalState.TryGetValue<T>. Pose, velocity and container are always recorded; a variable is not, because a snapshot costs a serialization of its value every tick on every worker that holds a copy.

public sealed class Pawn : NetworkBehaviour
{
    [SyncHistory] public NetworkVariable<byte> Stance = new NetworkVariable<byte>();
}

Recording happens only on a worker (NebulaRuntime.IsServer) and only while NebulaConfig.StateHistoryTicks is above zero. See docs/state-history.md.