Vixen
dd8b0a81
csharp
public sealed class NetworkParentReplicator

Replicates NetworkParent: which frame a transform is quoted in.

Read the guide page for this →

Remarks

Reliable and high priority, for NetworkSpawn's reasons exactly. It is written once when somebody mounts and once when they get off, so the baseline machinery suppresses it on every tick in between and it costs nothing to keep sending. What it must not do is arrive after the transforms that depend on it, so it outranks NetworkTransformReplicator in the same snapshot.

⚠ Outranking the transform is not the same as arriving before it. Priority orders one snapshot; a lost packet, an interest change or the budget can still deliver a rider's position while its frame is outstanding, and on the first snapshot after a mount the vehicle itself may not be spawned here yet. That case is real and is handled where it can be — NetworkTransformApplySystem holds the rider still until the frame exists.

Fields and properties (8)

  • public const int ParentPriority

    Ahead of every transform and behind a spawn.

  • public ComponentTypeId ComponentType

    Which component this replicates.

  • public uint TypeId

    The id this type has on the wire: a hash of its full name, computed at build time.

  • public string TypeName

    The name, for diagnostics and for the bandwidth attribution panel.

  • public Channel Channel

    How to send it.

  • public int Priority

    What to shed last. Higher goes first.

  • public QueryDescription ChangedQuery

    A query matching entities with this component, filtered on it having changed.

  • public ReadOnlySpan<WireLane> Lanes

    The fixed-width fields Write produces, in the order it produces them.

Methods (3)

  • public bool Has(World world, Entity entity)

    Whether an entity has this component at all.

  • public void Write(World world, Entity entity, ref BitWriter writer)

    Encodes an entity's component.

  • public bool Apply(World world, Entity entity, ref BitReader reader)

    Decodes a component and puts it on an entity, adding it if it is not there.

Used by (1)

  • MotionTestsVixen.Net.Tests