Back to Writing
NOTESunityphotonpun2webglnetworking

Unity PUN2 — WebGL Protocol Configuration

August 28, 2021Updated Feb 17, 2026

When using PUN2 from Photon Engine, communication won't work if you use the default protocol (UDP) as-is. You need to select WebSocket or TCP. It may automatically switch during build, but for testing in the editor, setting it to WebSocket is the most convenient option.