public sealed class InterestChainResolvers composed: a source of candidates and rules that decide about them.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
[16](../../../docs/plan/16-networking.md) asks for composable resolvers "in evaluation order: scene scope → explicit visibility overrides → distance grid → LOD rate reduction", and this is the first three of those. The fourth is deliberately not here, and the reason is worth stating because implementing the sentence as written produces a bug that looks like the feature working.
Rate reduction is not an interest decision. Leaving an object out of the observed set does not mean "skip it this tick" — ReplicationServer treats an object that has left the set as one the client should drop, because leaving interest and being destroyed are deliberately the same mechanism. So an LOD written as a rule would despawn and respawn every distant object on every tick it skipped. Rate belongs to the record writer, where skipping is already what the bandwidth budget does; see IReplicationRate.
The fallback is Observed, so a chain with no rules is the behaviour a new project already had. Adding a rule can then only ever hide things, which is the direction in which mistakes are visible: an object that should not be there is noticed, and one that silently is not is debugged.
Fields and properties (5)
public IList<IInterestRule> RulesThe rules, asked in order until one has an opinion.
public IInterestSource SourceWhere candidates come from. Every networked entity, unless replaced.
public Interest FallbackWhat to do about an object no rule had an opinion on.
public int ConsideredCountHow many candidates the last resolve considered.
public int HiddenCountHow many of them were hidden.
Methods (2)
Used by (2)
- InterestTestsVixen.Net.Tests
- NetworkSpawnTestsVixen.Net.Engine.Tests