diff --git a/Assets/Script/UI/PC/Info/PCInfoUI_Center.cs b/Assets/Script/UI/PC/Info/PCInfoUI_Center.cs index e6c5f74a2..6d07c5dd0 100644 --- a/Assets/Script/UI/PC/Info/PCInfoUI_Center.cs +++ b/Assets/Script/UI/PC/Info/PCInfoUI_Center.cs @@ -12,11 +12,12 @@ public class PCInfoUI_Center : UI3DModel public GameObject[] gos; // 0 코스튬 착용 버튼 public int CostumeIdWhenEnter; + public bool firstInit = false; PCInfoUI_PCListCard SelectCard; AsyncOperationHandle currentHandle; - public void Set(bool enter, PCInfoUI_PCListCard choiceCard) + public void Set(PCInfoUI_PCListCard choiceCard) { var sdata = ServerInfo.Ins.m_ServerData; @@ -26,12 +27,12 @@ public class PCInfoUI_Center : UI3DModel SelectCard = choiceCard; SelectCard.gos[0].SetActive(true); - //if (enter) + if (!firstInit) { + firstInit = true; m_MyPet.Set(table_petlist.Ins.Get_Data_orNull(sdata.Get_EqiupmentEquip(eItem.Pet))); m_MyPet.Set_CardType(eUICardType.NoTouch); - if (sdata.IsObtainItem(choiceCard.Get_IntData())) - CostumeIdWhenEnter = choiceCard.Get_IntData(); + CostumeIdWhenEnter = choiceCard.Get_IntData(); } var costumeid = SelectCard.Get_IntData(); diff --git a/Assets/Script/UI/PC/Info/PCInfoUI_PCListCard.cs b/Assets/Script/UI/PC/Info/PCInfoUI_PCListCard.cs index 848b67317..37b18c319 100644 --- a/Assets/Script/UI/PC/Info/PCInfoUI_PCListCard.cs +++ b/Assets/Script/UI/PC/Info/PCInfoUI_PCListCard.cs @@ -34,6 +34,6 @@ public class PCInfoUI_PCListCard : CardBase public void OnClick_Costume() { - PCInfoUI.Ins.m_PCInfoUI_Center.Set(false, this); + PCInfoUI.Ins.m_PCInfoUI_Center.Set(this); } } \ No newline at end of file diff --git a/Assets/Script/UI/PC/PCUI.cs b/Assets/Script/UI/PC/PCUI.cs index 0b85a7f4e..077bc6ae0 100644 --- a/Assets/Script/UI/PC/PCUI.cs +++ b/Assets/Script/UI/PC/PCUI.cs @@ -21,6 +21,8 @@ public class PCUI : BotMenuBase list_TabData[i].btnImg_off = $"menu icon {i + 1}"; } m_Tab.Set(list_TabData); + + PCInfoUI.Ins.m_PCInfoUI_Center.firstInit = false; OnClick_Tab(); }