using TMPro; using UnityEngine; public class UI_Inven_Item : UI_Base { enum GameObjects { ItemIcon, ItemNameText, } string _name; void Start() { Init(); } public override void Init() { Bind(typeof(GameObjects)); Get((int)GameObjects.ItemNameText).GetComponent().text = _name; Get((int)GameObjects.ItemIcon).AddUIEvent((PointerEventData) => { Debug.Log($"아이템 클릭! {_name}"); }); } public void SetInfo(string name) { _name = name; } }