fix: Assert 사용하지 않도록 변경

This commit is contained in:
aube.lee
2025-03-17 02:00:46 +09:00
parent 6e0ea12b9e
commit 54adca4e06
3 changed files with 10 additions and 11 deletions

View File

@@ -20,12 +20,12 @@ namespace TON
// 스킬 이미지 세팅하기
if (skillId != null) // 스킬 슬롯에 스킬이 지정된 경우
{
// out 으로 받을 변수 초기화
Sprite loadedSkillImage = null;
Assert.IsTrue(AssetManager.Singleton.LoadSkillIcon(skillId, out loadedSkillImage));
if (AssetManager.Singleton.LoadSkillIcon(skillId, out Sprite loadedSkillImage))
{
skillImage.SetActive(true);
skillImage.GetComponent<Image>().sprite = loadedSkillImage;
}
}
lockerImage.SetActive(false);
}

View File

@@ -39,15 +39,13 @@ namespace TON
private void SetMyRankBoxImage()
{
Sprite loadedMyBoxImage = null;
Assert.IsTrue(AssetManager.Singleton.LoadMyRankBoxImage(out loadedMyBoxImage));
if (AssetManager.Singleton.LoadMyRankBoxImage(out Sprite loadedMyBoxImage))
rankBoxImage.GetComponent<Image>().sprite = loadedMyBoxImage;
}
private void SetPawIcon(int rank)
{
Sprite loadedPawImage = null;
Assert.IsTrue(AssetManager.Singleton.LoadRankPawIcon(rank, out loadedPawImage));
if (AssetManager.Singleton.LoadRankPawIcon(rank, out Sprite loadedPawImage))
pawImage.GetComponent<Image>().sprite = loadedPawImage;
}
}

View File

@@ -76,6 +76,7 @@ namespace TON
float y = 0;
for (int i = 0; i < rankList.Count; i++)
{
Debug.Log($"RankList[{i}]: {rankList[i].nickname}");
ClearData clearData = rankList[i];
RankBoxItem rankBox = Instantiate(rankBoxPrefab, scrollRect.content);