This document is about: PUN 2
SWITCH TO

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.

Photon Lag Simulation Gui

PUN includes a simple GUI component to control the built-in network and lag simulation of the Photon client. Provided your network conditions are relatively good, you can add lag and loss to try out how well your game mechanics work in worse conditions.

Usage

Add the component PhotonNetSimSettingsGui to an enabled GameObject in your scene. At runtime, the top left of the screen shows the current roundtrip time (RTT) and the controls for network simulation:

  • RTT: The roundtrip time is the average of milliseconds until a message was acknowledged by the server. The variance value (behind the +/-) shows how stable the rtt is (a lower value being better).
  • "Sim" toggle: Enables and disables the simulation. A sudden, big change of network conditions might result in disconnects.
  • "Lag" slider: Adds a fixed delay to all outgoing and incoming messages. In milliseconds.
  • "Jit" slider: Adds a random delay of "up to X milliseconds" per message.
  • "Loss" slider: Drops the set percentage of messages. You can expect less than 2% drop in the internet today.
Back to top