public void SetInventory() { InventoryScroll inventory = UiManager.InventoryScroll.GetComponent <InventoryScroll>(); for (int i = 0; i < Player.MaxInventory; i++) { GameObject inventorySlot = ObjManager.MakeObj("InventorySlot"); inventory.SetPhysicalInventory(i, inventorySlot); inventorySlot.transform.SetParent(inventory.Contents.transform, false); InventorySlot slot = inventorySlot.GetComponent <InventorySlot>(); slot.SetIndex(i); slot.SetType(-1); inventory.SetInventory(i, slot); inventorySlot.name = i.ToString(); } inventory.Contents.SetActive(false); }