Nebula
Protocol

EntityStateEntry

One entity's selected transform fields inside a WorldState/GhostState batch.

generated from the sources
public struct EntityStateEntry

One entity's selected transform fields inside a WorldState/GhostState batch.

Fields

WireSize

public const int WireSize = 8 + 4 + ContainerRef.MaxWireSize + 2 + 1 + 12 + 16 + 12 + 6 + 6;

Largest serialized size of one entry, for sizing Sequenced batches: id, epoch, container reference (two bytes for a static container, ten for a dynamic one), field mask, extension byte, position, rotation, scale, velocity and angular velocity. Only selected axes are serialized. Position, rotation, and scale precision follows NetworkTransform; velocity and angular velocity use three half floats when enabled.

NetId

public ulong NetId;

Epoch

public uint Epoch;

Container

public ContainerRef Container;

LocalPosition

public Vector3 LocalPosition;

LocalRotation

public Quaternion LocalRotation;

Velocity

public Vector3 Velocity;

LocalScale

public Vector3 LocalScale;

Fields

public TransformFields Fields;

Ext

public TransformFieldsExt Ext;

Protocol 30 additions; dropped when the entry is written for an older peer.

AngularVelocity

public Vector3 AngularVelocity;

Angular velocity in the container's local space, radians per second (TransformFieldsExt.AngularVelocity).

Properties

Reliable

public bool Reliable { get; }

Methods

Snapshot

public static EntityStateEntry Snapshot(NetworkIdentity e);

Write

public void Write(NetworkWriter w);
public void Write(NetworkWriter w, ushort version);

Write the entry as a peer of protocol version reads it: before 30, without Ext and what it announces.

Read

public static EntityStateEntry Read(NetworkReader r);
public static EntityStateEntry Read(NetworkReader r, ushort version);

Read an entry written for protocol version (Write).

On this page