How to disable a Button?

A have multiple buttons. They are shown or hidden by setting alpha to 0. Also they are disabled to not receive clicks.
The problem is that disabled buttons block clicks to buttons below them (higher in hierarchy).

ButtonObj.enabled = true;

How to disable a button completely? So that it would become “transparent” to clicks.
Is it possible to do without GameObject.SetActive(false)? It’s inconvenient to it because it changes parameters of child elements.


-I’m using UI Button

-setting Button component enabled property to false doesn’t solve the problem

-it doesn’t have a collider so I cannot disable it’s collider

Assuming ButtonObj is a GameObject with a collider attached to it: You could disable the collider. E.g.:

Collider col = ButtonObj.GetComponent<Collider> ();
col.enabled = false;

Solved the issue by moving buttons that are shown down the hierarchy.
Works fine.
Still solution looks kind of strange for me.