public void ChangeCategory(GameObject button) { Buttonbtn highlightableButton = button.GetComponent <Buttonbtn>(); scrollRect.content = highlightableButton.optionList.GetComponent <RectTransform>(); highlightableButton.Click(); activeButton.Click(); activeButton = highlightableButton; }
void Start() { inventoryItems = Resources.LoadAll <Inventory>("ItemObjects"); FullItemList = ItemObtainFromDatabase(); CreateItem(); if (FullItemList.Count > 0) { ShowItemInfo(FullItemList[0]); } ItemInfoSetup(); activeButton = OptionBtnGO[0].GetComponent <Buttonbtn>(); activeButton.Click(); }