Photon Unity Networking v1.101

Public Member Functions | Public Attributes | List of all members
PhotonStatsGui Class Reference

Basic GUI to show traffic and health statistics of the connection to Photon, toggled by shift+tab. More...

Inherits MonoBehaviour.

Public Member Functions

void Start ()
 
void Update ()
 Checks for shift+tab input combination (to toggle statsOn). More...
 
void OnGUI ()
 
void TrafficStatsWindow (int windowID)
 

Public Attributes

bool statsWindowOn = true
 Shows or hides GUI (does not affect if stats are collected). More...
 
bool statsOn = true
 Option to turn collecting stats on or off (used in Update()). More...
 
bool healthStatsVisible
 Shows additional "health" values of connection. More...
 
bool trafficStatsOn
 Shows additional "lower level" traffic stats. More...
 
bool buttonsOn
 Show buttons to control stats and reset them. More...
 
Rect statsRect = new Rect(0, 100, 200, 50)
 Positioning rect for window. More...
 
int WindowId = 100
 Unity GUI Window ID (must be unique or will cause issues). More...
 

Detailed Description

Basic GUI to show traffic and health statistics of the connection to Photon, toggled by shift+tab.

The shown health values can help identify problems with connection losses or performance. Example: If the time delta between two consecutive SendOutgoingCommands calls is a second or more, chances rise for a disconnect being caused by this (because acknowledgements to the server need to be sent in due time).

Member Function Documentation

◆ OnGUI()

void PhotonStatsGui.OnGUI ( )

◆ Start()

void PhotonStatsGui.Start ( )

◆ TrafficStatsWindow()

void PhotonStatsGui.TrafficStatsWindow ( int  windowID)

◆ Update()

void PhotonStatsGui.Update ( )

Checks for shift+tab input combination (to toggle statsOn).

Member Data Documentation

◆ buttonsOn

bool PhotonStatsGui.buttonsOn

Show buttons to control stats and reset them.

◆ healthStatsVisible

bool PhotonStatsGui.healthStatsVisible

Shows additional "health" values of connection.

◆ statsOn

bool PhotonStatsGui.statsOn = true

Option to turn collecting stats on or off (used in Update()).

◆ statsRect

Rect PhotonStatsGui.statsRect = new Rect(0, 100, 200, 50)

Positioning rect for window.

◆ statsWindowOn

bool PhotonStatsGui.statsWindowOn = true

Shows or hides GUI (does not affect if stats are collected).

◆ trafficStatsOn

bool PhotonStatsGui.trafficStatsOn

Shows additional "lower level" traffic stats.

◆ WindowId

int PhotonStatsGui.WindowId = 100

Unity GUI Window ID (must be unique or will cause issues).