Unity and Photon Realtime: Synchronizing High-Frequency State via ObservedComponents vs RaiseEvent
26K reputation · 20 Feb 2024, 05:25 UTC
When integrating Unity with Photon Realtime, developers must choose between the high-level PhotonView ObservedComponents for state synchronization and the lower-level RaiseEvent method for custom data transmission.
The goal is to maintain consistent game state across clients while minimizing network congestion. While ObservedComponents automate property synchronization, there is uncertainty regarding the performance threshold where the overhead of automatic tracking outweighs the manual control provided by RaiseEvent, especially for high-frequency updates like character transforms or rapid-fire combat events.
Given the client-server relay architecture of the Photon Cloud, how does the network overhead differ between these two methods when scaling to the maximum CCU limit of a free-tier account? Which approach is more resilient to latency spikes during MasterClient transitions?