Disabling button by script

All the answers I found in google dated by 2015 and not working on my version of Unity, so how can I disable UI Canvas button by script to keep it visible, but not allowed to click?

@Impal3r ,

Hi there,

I think you should check out the manual first or do search on manual.

I don’t think nothing has changed in this matter since last year.

And why not show your code so we can see what might be the problem?

But first I’d check this page:
https://docs.unity3d.com/ScriptReference/UI.Selectable-interactable.html

1 Like