Vixen
dd8b0a81
csharp
public sealed class NetworkBoneSelectionSystem

Gives every networked character a bone selection, so the pose path is not a no-op.

Read the guide page for this →

As a system

Phase
LateUpdate

Remarks

⚠ Both pose systems bail out on a null Joints, and nothing in the repository ever wrote one (). So a game could register the replicators, schedule the systems and attach NetworkBones to every character, and the whole path would do nothing — no exception, no counter, no bytes.

It adds the component as well as filling it, for the same reason the physics registration adds the character pass whether or not there are characters: the alternative is a second thing a game has to know to do, and forgetting it is invisible.

Once per character, not once per tick. The selection is a function of the rig, so it is computed the first time a character is seen with an animator and never again — and a character whose Animator has not been attached yet is simply seen again next tick.

⚠ The policy has to give the same answer on every peer, and that is not a style rule. The selection is not replicated, by design, because it comes from content both ends have. A Policy that read anything else — a distance, a camera, a random subset — would have the two ends unpacking one wire layout into different joints, which reads as a character folded inside out rather than as a wiring mistake.

Fields and properties (5)

  • public SystemAccess Access

    What this system reads and writes.

  • public Func<Skeleton, int[]> Policy

    Which joints of a rig go on the wire. Defaults to Trunk.

  • public long SelectedCount

    How many characters have been given a selection.

  • public long JointCount

    How many joints those selections came to, added up.

  • public long WaitingCount

    How many characters were skipped because their animator has not been attached yet.

Methods (2)

  • public override JobHandle Update(in SystemContext context, JobHandle dependency)

    Runs the system.

  • public int Select(World world)

    Gives a selection to every networked character that has not got one.

Used by (2)

  • NetworkAnimationSystemsVixen.Net.Animation
  • NetworkAnimationWiringTestsVixen.Net.Animation.Tests