UI - Compatible graphics settings?

I am making a graphics settings menu and I want to be able to disable some buttons if it isn’t supported by the hardware. How can I detect this?

GetComponent<Button>().interactable = false;

Someting like that but I need to detect IF it is supported first

Found it here.