Button OnClick() Missing Code Error, How do I fix this?

I’m working on an application that requires me to use the unity UI button. I’ve been trying to connect a method to the OnClick() function that’s built into the button interface, but so far all I got is a message that said “” and the button have no functionality. Can someone tell me what’s going on here and how do I fix this? Thank you.

Okay I’ve found the solution to my problem. I made the onClick() method static in the code, after removing the “static” the onClick() method was able to find the method and everything went well.