LogTrafficStats
How do I use Log Traffic Stats
Below are practical examples compiled from projects for learning and reference purposes
Featured Snippets
Line | Code | Ex.. |
---|---|---|
17 | sl.LogTrafficStats = this.LogTrafficStats; | 1 |
28 | if (LogTrafficStats) | 2 |
41 | if (this.LogTrafficStats) | 3 |
66 | if (LogTrafficStats) | 4 |
File name: SupportLogger.cs
Copy
9 public void Start()
10 {
11 GameObject go = GameObject.Find("PunSupportLogger");
12 if (go == null)
13 {
14 go = new GameObject("PunSupportLogger");
15 DontDestroyOnLoad(go);
16 SupportLogging sl = go.AddComponent
17 sl.LogTrafficStats = this.LogTrafficStats;
18 }
19 }
File name: SupportLogger.cs
Copy
26 public void Start()
27 {
28 if (LogTrafficStats)
29 {
30 this.InvokeRepeating("LogStats", 10, 10);
31 }
32 }
File name: SupportLogger.cs
Copy
39 public void LogStats()
40 {
41 if (this.LogTrafficStats)
42 {
43 Debug.Log("SupportLogger " + PhotonNetwork.NetworkStatisticsToString());
44 }
45 }
File name: SupportLogger.cs
Copy
61 public void OnConnectedToPhoton()
62 {
63 Debug.Log("SupportLogger OnConnectedToPhoton().");
64 this.LogBasics();
65
66 if (LogTrafficStats)
67 {
68 PhotonNetwork.NetworkStatisticsEnabled = true;
69 }
70 }
LogTrafficStats 139 lượt xem
Gõ tìm kiếm nhanh...