I want to make an inventory with different categories and if a category is selected the button for that category should no longer get a overlay if it is pressed. I've tried changing the pressed.color like this:
Button btn = catogory_inventroy.GetComponent<Button>();
...
btn.colors.pressedColor.a = new Color(0f, 0f, 0f, 0f);
but then it says
The return value of "ColorBlock.pressedColor" is not a variable and therefore cannot be changed.
I've also tried assigning the value of the new color before, but still doesn't work So what can I do to fix my probleme?