public sealed class PredictedOwnershipSystemDecides which objects this client predicts, from who owns them.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
The policy that was missing, and it is the one everything else already answers. Predicted is a tag, and until now a game put it on by hand. What a client should predict is what it is allowed to decide — which is exactly NetworkRules.Write, the same question the rigid bodies and the animators ask. Inventing a second notion of "mine" beside the rules is how the two come to disagree, and the day they disagree is the day a client predicts something the server will overrule on every single tick.
It removes the tag as well as adding it, because ownership is transferable: a vehicle somebody else takes is one this client must stop predicting, and a predicted object whose prediction is never confirmed is a correction every snapshot for as long as it lives.
Fields and properties (5)
public NetworkRulesRegistry? RulesWho decides what. Without it nothing is predicted, which is the safe answer.
public PlayerId LocalWhich player this peer is.
public int PredictedCountHow many objects are predicted right now.
public long AddedCountObjects that started being predicted.
public long RemovedCountObjects that stopped.
Methods (1)
public void Update(World world)Brings the tags in line with who owns what.
Used by (1)
- PredictionWiringTestsVixen.Net.Tests