Why i can't see methods inside a script that directly dragged to the Onclick area inside the button and see them dragging canvas with that script inside it?,

Hello guys, I’m pretty new with Unity and I wonder why i can’t see the methods inside the script by dragging dragging script to OnClick and i can see that methods by adding that script to canvas that the button resides and dragging canvas to OnClick area see all the methods inside the script.,

hello, you need to make it public, and if it is not marked public or private it will be marked private by default.