Differences

Prediction version 2 is a new world state driven system, while version 1 focused only on the player owned object. Both versions will be available for some time, and you can easily switch between the two as described in the Getting Started section.

States

In version 2 actual input and reconciles are forwarded to all clients, not just the owner. In version 1 only the owner received this information. Now with all clients aware of the data they will run the same inputs and reconcile, just as the server and owner does.

This change also means that you will not need to communicate certain values to clients outside the replicate method. For example, in version 1 if crouch was held the replicate will crouch on owner and server, but other clients were unaware of the crouch. You would be required to update other clients using other means, such as a RPC or SyncVar. In version 2 since the same inputs are run on all clients, values are updated correctly without any special work.

Predicting Multiple Objects

Version 1 has limitations which does not allow you to predict multiple owned objects at once, each in their own script. For more information on what this implies see Limitations and Gotchas of version 1. In version 2 this restriction does not apply.

Predicting Without an Owned Object

Another limitation of version 1 is that if a player was not regularly performing a replicate and reconcile method on an object they owned, other objects could not be predicted. This limitation is found here. Version 2 does not require owned objects to replicate to receive prediction updates.

Bandwidth

Rigidbody prediction in version 1 is heavier than desired in regards to bandwidth used. In version 2 inputs from replicates will often use less bandwidth than sending rigidbody states every tick as version 1 did. As of right now version 2 is still sending states via the reconcile method, but less often. Reconcile states are not being sent as deltas yet but this is something we most definitely plan to change as experimental testing goes on. By the end of it all, bandwidth used is expected to be considerably less.

Last updated