public void SegregateCategory(int categoryId) { selectedCategoryId = categoryId; for (int categoryIndex = 0; categoryIndex < allCategoriesBtn.Count; categoryIndex++) { //Reset all category button allCategories[categoryIndex].SetCategorySeletionStatus(true, normalColor); } //Update selected category details allCategories[categoryId].SetCategorySeletionStatus(false, onSelectionColor); //Set clear button active clearBtn.interactable = true; //Disable all item details displaying itemDetailsPanel.SetAllUIDetailsStatus(false); //Filter out selected category items itemsPanel.OnCategorySelection(categoryId); }