void OnResetUserDataButtonPressed() { EB.Debug.Log("Reset User Data Button Pressed"); m_has_reset_user_data_butten_been_pressed = true; string cachePath = System.IO.Path.Combine(Application.persistentDataPath, "Caches"); if (System.IO.Directory.Exists(cachePath)) { System.IO.Directory.Delete(cachePath, true); } PlayerPrefs.DeleteAll(); PlayerPrefs.SetInt("m_api_selected_server_id", m_api_selected_server_id); PlayerPrefs.SetInt("m_ota_selected_server_id", m_ota_selected_server_id); PlayerPrefs.SetString("m_api_other_server_address", m_api_other_server_address); PlayerPrefs.SetString("m_ota_other_server_address", m_ota_other_server_address); PlayerPrefs.Save(); if (m_show_fps || m_show_memory_usage) { GameObject debugObj = new GameObject("DebugPerformance"); DebugPerformance debugPerformance = debugObj.AddComponent <DebugPerformance>(); debugPerformance.displayFps = m_show_fps; debugPerformance.displayMemoryUsage = m_show_memory_usage; } if (m_use_proxy) { SetupProxy("127.0.0.1:8888"); } }
void OnStartButtonPressed() { EB.Debug.Log("Start Button Pressed"); m_has_start_butten_been_pressed = true; PlayerPrefs.SetInt("m_api_selected_server_id", m_api_selected_server_id); PlayerPrefs.SetInt("m_ota_selected_server_id", m_ota_selected_server_id); PlayerPrefs.SetString("m_api_other_server_address", m_api_other_server_address); PlayerPrefs.SetString("m_ota_other_server_address", m_ota_other_server_address); PlayerPrefs.SetString("debug_authAPIAddress", authAPIAddress); PlayerPrefs.Save(); if (m_show_fps || m_show_memory_usage) { GameObject debugObj = new GameObject("DebugPerformance"); DebugPerformance debugPerformance = debugObj.AddComponent <DebugPerformance>(); debugPerformance.displayFps = m_show_fps; debugPerformance.displayMemoryUsage = m_show_memory_usage; } if (m_use_proxy && !string.IsNullOrEmpty(m_proxy)) { SetupProxy(m_proxy); } }