From d155285e1e4ba90f6a0c2927e8619e7874ad671a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=ED=8C=90=EB=8F=8C?= Date: Wed, 6 Mar 2024 22:45:33 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9D=B8=EB=B2=A4=20ui=EC=9E=91=EC=97=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Client/Assets/1_Script/Prefab/InvenItemPrefab.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Client/Assets/1_Script/Prefab/InvenItemPrefab.cs b/Client/Assets/1_Script/Prefab/InvenItemPrefab.cs index 181cf3e2..6c5644fc 100644 --- a/Client/Assets/1_Script/Prefab/InvenItemPrefab.cs +++ b/Client/Assets/1_Script/Prefab/InvenItemPrefab.cs @@ -25,13 +25,14 @@ public class InvenItemPrefab : MonoBehaviour ConsumableItem consumableItem = Statics.itemManager.box.FindConsumableItemDataId(consumableItemData.index); if (consumableItem != null) { - this.count = 0; - gameObject.SetActive(false); + this.count = consumableItem.count; + gameObject.SetActive(this.count != 0); + } else { - this.count = consumableItem.count; - gameObject.SetActive(true); + this.count = 0; + gameObject.SetActive(false); } } }