PUN Classic (v1), PUN 2 and Bolt are in maintenance mode. PUN 2 will support Unity 2019 to 2022, but no new features will be added. Of course all your PUN & Bolt projects will continue to work and run with the known performance in the future.
For any upcoming or new projects: please switch to Photon Fusion or Quantum.
Replication Modes
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 (Bolt/Compile Assembly
).
Description
Here we have a description of each Replication Mode
available on Photon Bolt:
- Everyone: this is the default
Replication Mode
mode when you create a newState
property, as it's the most used form. In this case, only theOwner
of the entity is able to change it's state values. - Everyone Except Controller:: in this case, extending the
Everyone
mode, theOwner
still can change the state, but theController
can 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
Owner
being able to change the state, but instead of allowing theController
change 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 (
Owner
,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.
Comparison Table
Here is a comparison table showing the relation between the Replications Mode
and peer types:
Owner | Controller | Others | |
---|---|---|---|
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 Owner
or Controller
types means, please check Who is Who?.