How i can hide a control (Button , label ,,,,,) in unity?

hey everyone , i am doing some user interface using the OnGUI() method , but i am wondering if i can hide some of the created controls when user do some actions , is there a way ,

what exactly i am doing is when a user click a (Show-Hide) button other buttons show up and when press it again these new buttons must go away (hide)

thnx all

Use a boolean so the desired code doesn’t run if the boolean is set to false.

–Eric

thnx eric but does the unity itself provide a mechanism to hide the controls ?

No, but it’s not necessary, just use a boolean.

–Eric