This commit is contained in:
2026-05-06 01:32:09 +05:30
parent 184d4fbc04
commit c2144630fd
10 changed files with 1675 additions and 1605 deletions
+68 -10
View File
@@ -1,4 +1,5 @@
using System;
using System.Collections;
using System.Threading.Tasks;
using UnityEngine;
using UnityEngine.Networking;
@@ -23,6 +24,10 @@ public static class Cupid
public static bool isInitialized => settings != null;
/// <summary>True once <see cref="Init"/> has built a matchmaker base URI and stored a bearer token (required for <c>/settings</c>).</summary>
public static bool IsEndpointReady =>
!string.IsNullOrEmpty(cupidBaseUri) && !string.IsNullOrEmpty(bearerToken);
public static int RoomPort = -1;
@@ -74,16 +79,7 @@ public static class Cupid
return;
}
if (body.Trim() == "403 Unauthorized")
{
Logger.Log("Cupid settings: wrong or missing password query (server rejected /settings).");
settings = null;
return;
}
settings = JsonUtility.FromJson<CupidSettings>(body);
if (settings == null) { throw new NullReferenceException(); }
Logger.Log("Cupid init success");
ApplySettingsJsonBody(body, logSuccess: true);
}
catch (Exception e)
{
@@ -94,6 +90,60 @@ public static class Cupid
}
}
/// <summary>
/// Re-fetches GET <c>/settings</c> (e.g. each time Main Menu is shown). Safe to call from a coroutine; no-op if not <see cref="IsEndpointReady"/>.
/// </summary>
public static IEnumerator CoRefreshSettings()
{
if (!IsEndpointReady)
yield break;
string settingsUrl = CupidURI + "/settings?password=" + UnityWebRequest.EscapeURL(settingsPassword ?? "");
using (UnityWebRequest www = UnityWebRequest.Get(settingsUrl))
{
www.SetRequestHeader("Authorization", "Bearer " + bearerToken);
yield return www.SendWebRequest();
if (www.result != UnityWebRequest.Result.Success)
{
Logger.Log("Cupid settings refresh failed: " + www.error);
Logger.Log(www.downloadHandler != null ? www.downloadHandler.text : "");
yield break;
}
string body = www.downloadHandler != null ? www.downloadHandler.text : "";
ApplySettingsJsonBody(body, logSuccess: true);
}
}
static void ApplySettingsJsonBody(string body, bool logSuccess)
{
settings = null;
if (string.IsNullOrWhiteSpace(body))
return;
if (body.Trim() == "403 Unauthorized")
{
Logger.Log("Cupid settings: wrong or missing password query (server rejected /settings).");
return;
}
try
{
var parsed = JsonUtility.FromJson<CupidSettings>(body);
if (parsed == null)
throw new NullReferenceException(nameof(CupidSettings));
settings = parsed;
if (logSuccess)
Logger.Log("Cupid settings updated");
}
catch (Exception e)
{
Logger.Log("Cupid settings JSON error: " + e.Message + " body=" + body);
settings = null;
}
}
/// <summary>
/// Plain host/IP + HTTP port, or an absolute URL (https://host with no port uses 443).
/// Sets <paramref name="hostOnly"/> for game client transport; <paramref name="baseUri"/> has no trailing slash.
@@ -212,6 +262,14 @@ public class CupidSettings
public int minimum_players;
public int maximum_players;
public int waiting_time;
public int port_range_min;
public int port_range_max;
/// <summary>RC stake per player for the default match (<c>/settings</c>), in coin units (same as matchmaker <c>entry_fee</c>).</summary>
public int entry_fee;
/// <summary>Optional side-bet or table minimum from matchmaker settings; same units as <see cref="entry_fee"/>.</summary>
public int bet_fee;
/// <summary>Winner net RC prize from settings, coin units (same as room <c>rc_prize</c>).</summary>
public int rc_prize;
}
[System.Serializable]
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+15 -79
View File
@@ -1,80 +1,16 @@
Logger initiated at 5/4/2026 11:49:38 PM
Logger initiated at 5/6/2026 1:30:30 AM
[5/4/2026 11:49:38 PM] Cupid init success
[5/4/2026 11:49:44 PM] Starting matchmake as warlock2
[5/4/2026 11:49:45 PM] Starting matchmake as warlock
[5/4/2026 11:49:47 PM] Still waiting: {"ok":true,"entry_fee":21,"rc_prize":37,"for_red":{"Players":[{"Name":"warlock","LastSeen":1777918787128,"UserId":4,"l10_wins":4,"l10_losses":2}],"GameName":"soccar","Port":26271,"InitTime":1777918787128,"entry_fee":21,"match_id":256,"rc_prize":37,"your_team":"red"},"for_blue":null}
[5/4/2026 11:49:48 PM] Got into a room
[5/4/2026 11:49:48 PM] {"ok":true,"entry_fee":21,"rc_prize":37,"for_red":{"Players":[{"Name":"warlock","LastSeen":1777918787128,"UserId":4,"l10_wins":4,"l10_losses":2},{"Name":"warlock2","LastSeen":1777918788243,"UserId":5,"l10_wins":2,"l10_losses":4}],"GameName":"soccar","Port":26271,"InitTime":1777918787128,"entry_fee":21,"match_id":256,"instance_started":true,"rc_prize":37,"your_team":"red"},"for_blue":{"Players":[{"Name":"warlock","LastSeen":1777918787128,"UserId":4,"l10_wins":4,"l10_losses":2},{"Name":"warlock2","LastSeen":1777918788243,"UserId":5,"l10_wins":2,"l10_losses":4}],"GameName":"soccar","Port":26271,"InitTime":1777918787128,"entry_fee":21,"match_id":256,"instance_started":true,"rc_prize":37,"your_team":"blue"}}
[5/4/2026 11:49:48 PM] Configured dedicated match reporting for match id 256 with secret 38516e39d3406225b7c3015a66e5d25c54e9b2024c0755212122bdcea3e3a328 and internal api base https://kickkingsapi.playpoolstudios.com
[5/4/2026 11:49:48 PM] Setting cupid to load game scene
[5/4/2026 11:49:48 PM] Loading game scene
[5/4/2026 11:49:48 PM] Got into a room
[5/4/2026 11:49:48 PM] {"ok":true,"entry_fee":21,"rc_prize":37,"for_red":{"Players":[{"Name":"warlock","LastSeen":1777918788612,"UserId":4,"l10_wins":4,"l10_losses":2},{"Name":"warlock2","LastSeen":1777918788243,"UserId":5,"l10_wins":2,"l10_losses":4}],"GameName":"soccar","Port":26271,"InitTime":1777918787128,"entry_fee":21,"match_id":256,"instance_started":true,"rc_prize":37,"your_team":"red"},"for_blue":{"Players":[{"Name":"warlock","LastSeen":1777918788612,"UserId":4,"l10_wins":4,"l10_losses":2},{"Name":"warlock2","LastSeen":1777918788243,"UserId":5,"l10_wins":2,"l10_losses":4}],"GameName":"soccar","Port":26271,"InitTime":1777918787128,"entry_fee":21,"match_id":256,"instance_started":true,"rc_prize":37,"your_team":"blue"}}
[5/4/2026 11:49:48 PM] Configured dedicated match reporting for match id 256 with secret 38516e39d3406225b7c3015a66e5d25c54e9b2024c0755212122bdcea3e3a328 and internal api base https://kickkingsapi.playpoolstudios.com
[5/4/2026 11:49:48 PM] Setting cupid to load game scene
[5/4/2026 11:49:48 PM] Loading game scene
[5/4/2026 11:49:55 PM] Starting client at $kickkingsapi.playpoolstudios.com:26271
[5/4/2026 11:49:55 PM] Starting client at $kickkingsapi.playpoolstudios.com:26271
[5/4/2026 11:49:55 PM] Client connected
[5/4/2026 11:49:55 PM] Client connected
[5/4/2026 11:50:05 PM] Selected team changed from Red to Blue
[5/4/2026 11:50:05 PM] Selected team changed from Red to Blue
[5/4/2026 11:50:11 PM] Selected team changed from Blue to Red
[5/4/2026 11:50:11 PM] Selected team changed from Blue to Red
[5/4/2026 11:50:15 PM] Selected team changed from Red to Blue
[5/4/2026 11:50:15 PM] Selected team changed from Red to Blue
[5/4/2026 11:50:24 PM] Selected team changed from Blue to Red
[5/4/2026 11:50:24 PM] Selected team changed from Blue to Red
[5/4/2026 11:50:28 PM] Selected team changed from Red to Blue
[5/4/2026 11:50:28 PM] Score changed from 0 to 1
[5/4/2026 11:50:28 PM] Selected team changed from Red to Blue
[5/4/2026 11:50:28 PM] Score changed from 0 to 1
[5/4/2026 11:50:31 PM] Selected team changed from Blue to Red
[5/4/2026 11:50:31 PM] Selected team changed from Blue to Red
[5/4/2026 11:50:38 PM] Selected team changed from Red to Blue
[5/4/2026 11:50:38 PM] Selected team changed from Red to Blue
[5/4/2026 11:50:43 PM] Selected team changed from Blue to Red
[5/4/2026 11:50:43 PM] Selected team changed from Blue to Red
[5/4/2026 11:50:48 PM] Score changed from 0 to 1
[5/4/2026 11:50:48 PM] Score changed from 0 to 1
[5/4/2026 11:50:51 PM] Selected team changed from Red to Blue
[5/4/2026 11:50:51 PM] Selected team changed from Red to Blue
[5/4/2026 11:50:58 PM] Selected team changed from Blue to Red
[5/4/2026 11:50:58 PM] Selected team changed from Blue to Red
[5/4/2026 11:51:00 PM] Score changed from 1 to 2
[5/4/2026 11:51:00 PM] Score changed from 1 to 2
[5/4/2026 11:51:03 PM] Selected team changed from Red to Blue
[5/4/2026 11:51:03 PM] Selected team changed from Red to Blue
[5/4/2026 11:51:10 PM] Selected team changed from Blue to Red
[5/4/2026 11:51:10 PM] Selected team changed from Blue to Red
[5/4/2026 11:51:13 PM] Score changed from 2 to 3
[5/4/2026 11:51:13 PM] Score changed from 2 to 3
[5/4/2026 11:51:28 PM] Configured dedicated match reporting for match id 257 with secret 38516e39d3406225b7c3015a66e5d25c54e9b2024c0755212122bdcea3e3a328 and internal api base https://kickkingsapi.playpoolstudios.com
[5/4/2026 11:51:28 PM] Configured dedicated match reporting for match id 257 with secret 38516e39d3406225b7c3015a66e5d25c54e9b2024c0755212122bdcea3e3a328 and internal api base https://kickkingsapi.playpoolstudios.com
[5/4/2026 11:51:28 PM] Client disconnected
[5/4/2026 11:51:28 PM] Client disconnected
[5/4/2026 11:51:32 PM] Starting client at $kickkingsapi.playpoolstudios.com:26667
[5/4/2026 11:51:32 PM] Starting client at $kickkingsapi.playpoolstudios.com:26667
[5/4/2026 11:51:32 PM] Client connected
[5/4/2026 11:51:32 PM] Client connected
[5/4/2026 11:51:40 PM] Selected team changed from Red to Blue
[5/4/2026 11:51:40 PM] Selected team changed from Red to Blue
[5/4/2026 11:51:46 PM] Selected team changed from Blue to Red
[5/4/2026 11:51:46 PM] Selected team changed from Blue to Red
[5/4/2026 11:51:49 PM] Score changed from 0 to 1
[5/4/2026 11:51:49 PM] Score changed from 0 to 1
[5/4/2026 11:51:52 PM] Selected team changed from Red to Blue
[5/4/2026 11:51:52 PM] Selected team changed from Red to Blue
[5/4/2026 11:51:58 PM] Selected team changed from Blue to Red
[5/4/2026 11:51:58 PM] Selected team changed from Blue to Red
[5/4/2026 11:52:02 PM] Score changed from 1 to 2
[5/4/2026 11:52:02 PM] Score changed from 1 to 2
[5/4/2026 11:52:05 PM] Selected team changed from Red to Blue
[5/4/2026 11:52:05 PM] Selected team changed from Red to Blue
[5/4/2026 11:52:12 PM] Selected team changed from Blue to Red
[5/4/2026 11:52:12 PM] Selected team changed from Blue to Red
[5/4/2026 11:52:17 PM] Score changed from 2 to 3
[5/4/2026 11:52:17 PM] Score changed from 2 to 3
[5/4/2026 11:52:50 PM] Cupid init success
[5/4/2026 11:52:50 PM] Cupid init success
[5/6/2026 1:30:30 AM] Cupid settings updated
[5/6/2026 1:30:30 AM] Cupid settings updated
[5/6/2026 1:30:32 AM] Starting matchmake as warlock
[5/6/2026 1:30:35 AM] Still waiting: {"ok":true,"entry_fee":21,"rc_prize":37,"for_red":{"Players":[{"Name":"warlock","LastSeen":1778011235432,"UserId":4,"l10_wins":7,"l10_losses":0}],"GameName":"soccar","Port":26248,"InitTime":1778011235432,"entry_fee":21,"match_id":261,"rc_prize":37,"your_team":"red"},"for_blue":null}
[5/6/2026 1:30:37 AM] Got into a room
[5/6/2026 1:30:37 AM] {"ok":true,"entry_fee":21,"rc_prize":37,"for_red":{"Players":[{"Name":"warlock","LastSeen":1778011236864,"UserId":4,"l10_wins":7,"l10_losses":0},{"Name":"warlock2","LastSeen":1778011236463,"UserId":5,"l10_wins":0,"l10_losses":7}],"GameName":"soccar","Port":26248,"InitTime":1778011235432,"entry_fee":21,"match_id":261,"instance_started":true,"rc_prize":37,"your_team":"red"},"for_blue":{"Players":[{"Name":"warlock","LastSeen":1778011236864,"UserId":4,"l10_wins":7,"l10_losses":0},{"Name":"warlock2","LastSeen":1778011236463,"UserId":5,"l10_wins":0,"l10_losses":7}],"GameName":"soccar","Port":26248,"InitTime":1778011235432,"entry_fee":21,"match_id":261,"instance_started":true,"rc_prize":37,"your_team":"blue"}}
[5/6/2026 1:30:37 AM] Configured dedicated match reporting for match id 261 with secret 38516e39d3406225b7c3015a66e5d25c54e9b2024c0755212122bdcea3e3a328 and internal api base https://kickkingsapi.playpoolstudios.com
[5/6/2026 1:30:37 AM] Setting cupid to load game scene
[5/6/2026 1:30:37 AM] Loading game scene
[5/6/2026 1:30:43 AM] Starting client at $kickkingsapi.playpoolstudios.com:26248
[5/6/2026 1:30:43 AM] Client connected
[5/6/2026 1:30:57 AM] Client disconnected
[5/6/2026 1:31:02 AM] Cupid settings updated
[5/6/2026 1:31:02 AM] Cupid settings updated
+12 -10
View File
@@ -1784,8 +1784,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: -30}
m_SizeDelta: {x: 0, y: -60}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &494249509
GameObject:
@@ -1825,7 +1825,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: -0.0018310547, y: -252.88013}
m_AnchoredPosition: {x: -0.0018310547, y: -310.2}
m_SizeDelta: {x: 0.5, y: 504.79016}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &494249511
@@ -2436,6 +2436,8 @@ MonoBehaviour:
withdrawalScreen: {fileID: 484954850}
btnPlay: {fileID: 1825499016338738107}
rcPlayText: {fileID: 1485732205}
entryFeeTxt: {fileID: 2074209872}
rcPrizeTxt: {fileID: 1745030399}
btnBuyUsd5: {fileID: 1725071167}
btnBuyUsd20: {fileID: 215556028}
btnBuyUsd50: {fileID: 1025220152}
@@ -2813,8 +2815,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: -30}
m_SizeDelta: {x: 0, y: -60}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &750295826
GameObject:
@@ -5043,8 +5045,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: -30}
m_SizeDelta: {x: 0, y: -60}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &1314861804
GameObject:
@@ -6360,8 +6362,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: -30}
m_SizeDelta: {x: 0, y: -60}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &1698843030
GameObject:
@@ -8730,7 +8732,7 @@ GameObject:
- component: {fileID: 2074209873}
- component: {fileID: 2074209872}
m_Layer: 5
m_Name: prize_rc_txt (1)
m_Name: entry_rc_txt
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
+3 -1
View File
@@ -120,6 +120,7 @@ public class GameOverCanvas : MonoBehaviour
btnLeave.interactable = !val;
if(val){
StopCoroutine(countdownCoroutine);
countdownTxt.text = "";
}else{
countdownCoroutine = StartCoroutine(CoroutineCountdown());
}
@@ -336,6 +337,8 @@ public class GameOverCanvas : MonoBehaviour
StartCoroutine(CoroutineShowRematchPanel());
betSlider.maxValue = (LevelLoadManager.myPlayer.rc < LevelLoadManager.opponentPlayer.rc) ? LevelLoadManager.myPlayer.rc : LevelLoadManager.opponentPlayer.rc;
betSlider.value = betSlider.maxValue / 2;
betSlider.minValue = Mathf.Clamp(betSlider.maxValue /10f,5,10000);
}
IEnumerator CoroutineShowRematchPanel(){
@@ -358,7 +361,6 @@ public class GameOverCanvas : MonoBehaviour
StartCoroutine(CoroutineHideRematchPanel());
countdownCoroutine = StartCoroutine(CoroutineCountdown());
}
IEnumerator CoroutineHideRematchPanel(){
+75 -3
View File
@@ -1,3 +1,4 @@
using System.Collections;
using UnityEngine;
using TMPro;
using UnityEngine.SceneManagement;
@@ -5,6 +6,8 @@ using UnityEngine.UI;
public class MainMenuManager : MonoBehaviour
{
public const string MainMenuSceneName = "MainMenu";
const string CryptoAddressPrefsKey = "MainMenu.CryptoAddress";
/// <summary>500 CC fee to process a withdrawal.</summary>
const int WithdrawalFeeCc = 500;
@@ -25,6 +28,8 @@ public class MainMenuManager : MonoBehaviour
[Header("Play")]
public Button btnPlay;
public TMP_Text rcPlayText;
public TMP_Text entryFeeTxt;
public TMP_Text rcPrizeTxt;
[Header("Dummy Buy")]
public Button btnBuyUsd5;
@@ -42,6 +47,11 @@ public class MainMenuManager : MonoBehaviour
public ToggleButton toggleSfx;
public ToggleButton toggleMusic;
/// <summary>Default play cost (coin units) if <c>/settings</c> is not loaded yet.</summary>
const int FallbackEntryFeeCoins = 21;
int _matchEntryFeeCoins = FallbackEntryFeeCoins;
void Awake()
{
if(LoginManager.instance==null){
@@ -92,6 +102,9 @@ public class MainMenuManager : MonoBehaviour
toggleSfx.SetIsOn(AudioManager.instance.IsSFXOn());
toggleMusic.SetIsOn(AudioManager.instance.IsMusicOn());
if (!LevelLoadManager.BlocksMainMenuSettingsBootstrap)
StartCoroutine(CoBootstrapSettingsWithoutLoader());
}
void OnDestroy(){
@@ -117,7 +130,7 @@ public class MainMenuManager : MonoBehaviour
Debug.LogError("Play blocked: user profile not loaded.");
return;
}
if (LoginManager.CurrentUser.rc < 21)
if (LoginManager.CurrentUser.rc < _matchEntryFeeCoins)
{
Debug.LogError("Not enough RC to play");
return;
@@ -213,10 +226,13 @@ public class MainMenuManager : MonoBehaviour
ccText.text = user.cc.ToString("N0") + " CC";
rcText.text = CoinHelper.FormatString(user.rc) + " RC";
if(LoginManager.CurrentUser.rc < 21){
if (LoginManager.CurrentUser.rc < _matchEntryFeeCoins)
{
rcPlayText.text = "Not enough RC to play";
btnPlay.interactable = false;
}else{
}
else
{
rcPlayText.text = "";
btnPlay.interactable = true;
}
@@ -224,6 +240,62 @@ public class MainMenuManager : MonoBehaviour
UpdateWithdrawalStatus(user);
}
/// <summary>Called by <see cref="LevelLoadManager"/> so the loading overlay stays until matchmaker settings are refreshed.</summary>
public IEnumerator FinishLoadingScreenAndApplySettings()
{
yield return CoReadyMatchmakerSettingsThenApply();
}
IEnumerator CoBootstrapSettingsWithoutLoader()
{
yield return null;
yield return CoReadyMatchmakerSettingsThenApply();
}
IEnumerator CoReadyMatchmakerSettingsThenApply()
{
const float endpointWaitSec = 30f;
float deadline = Time.realtimeSinceStartup + endpointWaitSec;
while (!Cupid.IsEndpointReady && Time.realtimeSinceStartup < deadline)
yield return null;
yield return Cupid.CoRefreshSettings();
ApplyMatchmakerFeeUi();
if (LoginManager.CurrentUser != null)
OnUserUpdated(LoginManager.CurrentUser);
}
void ApplyMatchmakerFeeUi()
{
if (Cupid.Settings == null)
{
_matchEntryFeeCoins = FallbackEntryFeeCoins;
if (entryFeeTxt != null)
entryFeeTxt.text = "—";
if (rcPrizeTxt != null)
rcPrizeTxt.text = "—";
return;
}
CupidSettings s = Cupid.Settings;
_matchEntryFeeCoins = s.entry_fee > 0 ? s.entry_fee : FallbackEntryFeeCoins;
if (entryFeeTxt != null)
{
entryFeeTxt.text = s.entry_fee > 0
? CoinHelper.FormatString(s.entry_fee) + " RC"
: "—";
}
if (rcPrizeTxt != null)
{
rcPrizeTxt.text = s.rc_prize > 0
? CoinHelper.FormatString(s.rc_prize) + " RC"
: "—";
}
}
public void ShowMainMenuScreen(){
statsPanel.SetActive(true);
@@ -51,13 +51,36 @@ public class LevelLoadManager : MonoBehaviour
StartCoroutine(CoroutineLoadLevel(levelName));
}
/// <summary>When true, Main Menu bootstrap (matchmaker settings) owns the overlay; suppress duplicate work in <see cref="MainMenuManager"/>.</summary>
public static bool BlocksMainMenuSettingsBootstrap { get; private set; }
IEnumerator CoroutineLoadLevel(string levelName){
instance.Show();
yield return new WaitForSeconds(transitionDuration);
if(matchmadeUI.activeSelf){
yield return new WaitForSeconds(3f);
}
yield return SceneManager.LoadSceneAsync(levelName);
bool mainMenuDestination = levelName == MainMenuManager.MainMenuSceneName;
if (mainMenuDestination)
BlocksMainMenuSettingsBootstrap = true;
AsyncOperation asyncLoad = SceneManager.LoadSceneAsync(levelName);
yield return asyncLoad;
if (mainMenuDestination)
{
try
{
MainMenuManager menu = UnityEngine.Object.FindObjectOfType<MainMenuManager>();
if (menu != null)
yield return menu.FinishLoadingScreenAndApplySettings();
}
finally
{
BlocksMainMenuSettingsBootstrap = false;
}
}
instance.Hide();
}