/// <summary> /// 清理关闭控制器 /// </summary> public void Dispose() { PathManager.Instance.Dispose(); AssetManager.Instance.Dispose(); GameEnvironment.Instance.Dispose(); SocketManager.Instance.Dispose(); AudioManager.Instance.Dispose(); UIManager.Instance.Dispose(); WebImageManager.Instance.Dispose(); InputManager.Instance.Dispose(); DownLoadManager.Instance.Dispose(); ObjectPoolManager.Instance.Dispose(); HotFixManager.Instance.Dispose(); GameSceneManager.Instance.Dispose(); TimerManager.Instance.Dispose(); GameStateChecker.Instance.Dispose(); GameUtils.Instance.Dispose(); NotificationCenter.Instance.Dispose(); GameLooper.Instance.Dispose(); GameFactory.Instance.Dispose(); HTTPManager.OnQuit(); MemoryClear(); Destroy(gameObject); Instance = null; }
private void ActualQuit() { HTTPManager.OnQuit(); Application.Quit(); }
public void CancelRequests() { HTTPManager.OnQuit(); }
// Token: 0x060025A8 RID: 9640 RVA: 0x000B99E4 File Offset: 0x000B7DE4 private void OnGUI() { GeneralStatistics stats = HTTPManager.GetGeneralStatistics(StatisticsQueryFlags.All); GUIHelper.DrawArea(new Rect(0f, 0f, (float)(Screen.width / 3), 160f), false, delegate { GUIHelper.DrawCenteredText("Connections"); GUILayout.Space(5f); GUIHelper.DrawRow("Sum:", stats.Connections.ToString()); GUIHelper.DrawRow("Active:", stats.ActiveConnections.ToString()); GUIHelper.DrawRow("Free:", stats.FreeConnections.ToString()); GUIHelper.DrawRow("Recycled:", stats.RecycledConnections.ToString()); GUIHelper.DrawRow("Requests in queue:", stats.RequestsInQueue.ToString()); }); GUIHelper.DrawArea(new Rect((float)(Screen.width / 3), 0f, (float)(Screen.width / 3), 160f), false, delegate { GUIHelper.DrawCenteredText("Cache"); if (!HTTPCacheService.IsSupported) { GUI.color = Color.yellow; GUIHelper.DrawCenteredText("Disabled in WebPlayer, WebGL & Samsung Smart TV Builds!"); GUI.color = Color.white; } else { GUILayout.Space(5f); GUIHelper.DrawRow("Cached entities:", stats.CacheEntityCount.ToString()); GUIHelper.DrawRow("Sum Size (bytes): ", stats.CacheSize.ToString("N0")); GUILayout.BeginVertical(new GUILayoutOption[0]); GUILayout.FlexibleSpace(); if (GUILayout.Button("Clear Cache", new GUILayoutOption[0])) { HTTPCacheService.BeginClear(); } GUILayout.EndVertical(); } }); GUIHelper.DrawArea(new Rect((float)(Screen.width / 3 * 2), 0f, (float)(Screen.width / 3), 160f), false, delegate { GUIHelper.DrawCenteredText("Cookies"); if (!CookieJar.IsSavingSupported) { GUI.color = Color.yellow; GUIHelper.DrawCenteredText("Saving and loading from disk is disabled in WebPlayer, WebGL & Samsung Smart TV Builds!"); GUI.color = Color.white; } else { GUILayout.Space(5f); GUIHelper.DrawRow("Cookies:", stats.CookieCount.ToString()); GUIHelper.DrawRow("Estimated size (bytes):", stats.CookieJarSize.ToString("N0")); GUILayout.BeginVertical(new GUILayoutOption[0]); GUILayout.FlexibleSpace(); if (GUILayout.Button("Clear Cookies", new GUILayoutOption[0])) { HTTPManager.OnQuit(); } GUILayout.EndVertical(); } }); if (SampleSelector.SelectedSample == null || (SampleSelector.SelectedSample != null && !SampleSelector.SelectedSample.IsRunning)) { GUIHelper.DrawArea(new Rect(0f, 165f, (float)((SampleSelector.SelectedSample != null) ? (Screen.width / 3) : Screen.width), (float)(Screen.height - 160 - 5)), false, delegate { this.scrollPos = GUILayout.BeginScrollView(this.scrollPos, new GUILayoutOption[0]); for (int i = 0; i < this.Samples.Count; i++) { this.DrawSample(this.Samples[i]); } GUILayout.EndScrollView(); }); if (SampleSelector.SelectedSample != null) { this.DrawSampleDetails(SampleSelector.SelectedSample); } } else if (SampleSelector.SelectedSample != null && SampleSelector.SelectedSample.IsRunning) { GUILayout.BeginArea(new Rect(0f, (float)(Screen.height - 50), (float)Screen.width, 50f), string.Empty); GUILayout.FlexibleSpace(); GUILayout.BeginHorizontal(new GUILayoutOption[0]); GUILayout.FlexibleSpace(); GUILayout.BeginVertical(new GUILayoutOption[0]); GUILayout.FlexibleSpace(); if (GUILayout.Button("Back", new GUILayoutOption[] { GUILayout.MinWidth(100f) })) { SampleSelector.SelectedSample.DestroyUnityObject(); } GUILayout.FlexibleSpace(); GUILayout.EndVertical(); GUILayout.EndHorizontal(); GUILayout.EndArea(); } }
public void DestroyManager() { HTTPManager.OnQuit(); CloseAllSocket(); Instance = null; }