Here is a break-down of the four replication modes for properties in Photon Bolt and how they affect who can assign what and the traffic that goes over the wire.
This can be a simple option at first, but it can determine the overall behavior of an Entity State and how you can interact with it.
Keep in mind, as any change to the Bolt Assets, after each modification, you must recompile Bolt (
Here we have a description of each
Replication Mode available on Photon Bolt:
- Everyone: this is the default
Replication Modemode when you create a new
Stateproperty, as it's the most used form. In this case, only the
Ownerof the entity is able to change it's state values.
- Everyone Except Controller:: in this case, extending the
Ownerstill can change the state, but the
Controllercan also change the state. Keep in mind that all changes made to the state are not replicated to the other peers.
- Only Owner And Controller: similar to the last mode, the
Ownerbeing able to change the state, but instead of allowing the
Controllerchange the values locally, now the other peers (the ones not controlling the entity), are also able the modify the state (again, not being replicated).
- Local For Each Player: the last mode allows every peer type (
Controller, and Others) to modify the state values, but in this case, the values are never replicated and are available only locally, independent of who is modifying it.
Here is a comparison table showing the relation between the
Replications Mode and peer types:
|Everyone||Can Assign||Can't Assign (receives value from Owner)||Can't Assign (receives value from Owner)|
|Everyone Except Controller||Can Assign||Can Assign (not replicated)||Can't Assign (receives value from Owner)|
|Only Owner and Controller||Can Assign||Can't Assign (receives value from Owner)||Can Assign (not replicated)|
|Local for Each Player||Can Assign (not replicated)||Can Assign (not replicated)||Can Assign (not replicated)|
For more information about what
Controller types means, please check Who is Who?.