public void Init(bool isQuickSlot = false) { _textCount = GetComponentInChildren <TextMeshProUGUI>(); _inventoryRect = transform.parent.parent.GetComponent <RectTransform>().rect; _quickSlot = FindObjectOfType <QuickSlot>(); _quickSlotRect = _quickSlot.GetComponent <RectTransform>(); _quickSlotR = _quickSlot.GetComponent <RectTransform>().rect; IsQuickSlot = isQuickSlot; _player = FindObjectOfType <Player>(); _itemDrop = FindObjectOfType <ItemDrop>(); _inventory = FindObjectOfType <InventoryUI>(); }