Can't add c# to UI button

I can add javascript on Ui button but Ui button can’t see c# function

I can’see my function

have you declared the function to be public in your c# script?

2 Likes

The function must be public, cannot be static, and must be attached to a class that inherits from MonoBehaviour. Unity might also be out of sync with your code so if everything looks ducky reload the scripts and see if it works.

1 Like

I made public and worked thank you