- Home /
How to make buttons not clickable
Hello!
How do I make the buttons in the background not clickable and the background also to be a little grey as shown in the right picture?
Answer by Halfbiscuit · May 26, 2015 at 03:28 PM
I am going to assume you are going to/ are using the UI.Button.
With the default set-up the buttons have 'Colour transition' selected, there will be a colour called disabled colour for making the button grey when the interactable boolean is false.
When interactable is false you will also be unable to click the button.
I mean that the whole background would get grey when I have a similar 'watch a video' gameobjective active.
Thanks for the interactable part though.
Interactable = false made the buttons grey, but what about the background picture?
You could have a full screen canvas that is activated when the Watch Video dialog pops up. Just set the colors/transparency to what you want.
Yeah pretty much what Victu said, thats what I do for my pause screen.
Answer by David_Rios · Mar 29, 2019 at 06:56 PM
You can also activate a UI Panel behind the current window you just opened with the Raycast Target checkbox set as 'true' in its Image component; it would make the buttons behind it unclickable and you can adjust the tint of the panel through its image component's color opacity setting.