public void SetupInventory() { hotbar = GetComponent<Hotbar>(); mainWeightText = GameObject.Find("TextWeight").GetComponent<Text>(); backpackWeightText = GameObject.Find("TextWeightBackpack").GetComponent<Text>(); backpackContainer = GameObject.Find("BackpackContainer"); equipment = GameObject.Find("PanelEquipmentSlots").GetComponent<Equipment>(); database = GetComponent<ItemDatabase>(); slotCount = 18; inventoryPanel = GameObject.Find("PanelInventory"); slotPanel = inventoryPanel.transform.FindChild("PanelSlotsMain").gameObject; playerUI = GameObject.Find("PlayerUI"); inventoryContainer = playerUI.transform.FindChild("InventoryContainer").gameObject; CreateMainSlots(); CreateBackpackSlots(); equipment.CreateEquipmentSlots(); CreateHotbarSlots(); hotbar.SetupHotbar(); AddItem(0); AddItem(1); AddItem(2); AddItem(2); AddMultipleItems(3, 100); }