feedback report 3 done

This commit is contained in:
2026-09-24 13:12:15 +05:30
parent 5ac8f92006
commit d4c7f5dd46
21 changed files with 11867 additions and 153 deletions
+23
View File
@@ -94,6 +94,13 @@ public class CupidLobby : MonoBehaviour
{
RefreshMatchmakingPanel();
if (Application.internetReachability == NetworkReachability.NotReachable)
{
Logger.Log("Matchmaker unreachable: no internet");
StopMatchmakingNoInternet();
yield break;
}
using (UnityWebRequest req = UnityWebRequest.Get(Cupid.CupidURI + "/"))
{
req.downloadHandler = new DownloadHandlerBuffer();
@@ -101,6 +108,13 @@ public class CupidLobby : MonoBehaviour
yield return req.SendWebRequest();
string text = req.downloadHandler != null ? req.downloadHandler.text : "";
if (req.result == UnityWebRequest.Result.ConnectionError)
{
Logger.Log("Matchmaker unreachable: " + req.error + " body: " + text);
StopMatchmakingNoInternet();
yield break;
}
if (req.result != UnityWebRequest.Result.Success)
{
Logger.Log("Matchmaker poll failed: " + req.error + " body: " + text);
@@ -200,6 +214,15 @@ public class CupidLobby : MonoBehaviour
RefreshMatchmakingPanel();
}
void StopMatchmakingNoInternet()
{
matchmaking = false;
RefreshMatchmakingPanel();
if (MainMenuManager.instance != null)
MainMenuManager.instance.ShowMatchmakingNoInternet();
StartCoroutine(CancelMatchmake());
}
void RefreshMatchmakingPanel()
{
MatchmakingUI.SetActive(matchmaking);