Vixen
02b45cc4
csharp
public sealed class ReplicatedAttribute

Marks a component as one the server sends to clients.

No guide page documents this yet — the page shows what the code says about itself.

As a annotation

Valid on
Struct

Remarks

Read by Vixen.Net.Generators, which emits an IComponentReplicator for the type and registers it. Nothing reads it at run time — by the time the game is running, the decision it records has become code.

The defaults are the ones most components want: unreliable, because state that supersedes itself should not stall a channel waiting for a retransmit of a value that is already stale, and every tick, because a component nobody set does not cost anything to consider.

Fields and properties (3)

  • public Channel Channel

    How to send it. Unreliable by default — the next value makes this one irrelevant.

  • public int SendRate

    How many times a second to send it at most, or zero for every tick. A component that changes every tick but only matters ten times a second says so here.

  • public int Priority

    What to shed last when the bandwidth budget runs out. Higher goes first; the default of zero means "with everything else".

Used by (7)

  • CombatantMultiplayer
  • VitalsMultiplayer
  • GeneratedPoseVixen.Net.Generators.Tests
  • GeneratedScoreVixen.Net.Generators.Tests
  • GeneratedTransformVixen.Net.Generators.Tests
  • ReplicatedHealthVixen.Net.Tests
  • ReplicatedPositionVixen.Net.Tests