optimate for selected character

This commit is contained in:
VuNgocHaiC7
2026-05-04 14:12:01 +07:00
parent 391f790022
commit 0f26fd7578
3 changed files with 8 additions and 4 deletions
+2 -2
View File
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:329ce992197e8e90aa8ecc86ad5a2e9d0e4516ae41630b0e0fb4b68080d9ba75
size 303602
oid sha256:f809da92f7a74929fe4911b38ecddcf5bfe0fa9f667ad04f6c927511246975ae
size 308267
+2 -2
View File
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:08dd99327890c9a20d09b1faadef16ad55b5a276d5080d744bfdc2f4191dceac
size 111628
oid sha256:7bb8ce7140f7f3652a200d0393561498e3ecdd8f4425bd2248e1ff000f225e5e
size 106979
+4
View File
@@ -151,9 +151,11 @@ namespace BrewMonster.UI
_selectingCharacterItemUI = characterItemUI;
_selectingCharacterItemUI.SetFocus(true);
_btnEnterGame.gameObject.SetActive(true);
_btnEnterGame.interactable = false; // Disable the button until the model is ready
if (PlayerModelPreview.Instance == null || characterItemUI.RoleInfo == null)
{
_btnEnterGame.interactable = true; // If we can't show the model, allow entering the game anyway
return;
}
@@ -177,11 +179,13 @@ namespace BrewMonster.UI
if (PlayerModelPreview.Instance.playerModelIds != null && PlayerModelPreview.Instance.playerModelIds.Contains(roleId))
{
PlayerModelPreview.Instance.ShowPlayerModel(roleId);
_btnEnterGame.interactable = true;
_showModelReadyCoroutine = null;
yield break; // Model is ready, show it and stop this coroutine
}
yield return null;
}
_btnEnterGame.interactable = true;
_showModelReadyCoroutine = null;
}