Help! Buttons can't find function in scene editor

Hello! I’m trying create a button, that when you press it, something happens. At the moment, it’s just supposed to print something in chat, for testing purposes. But for some reason, the button can’t find the functions in the scene editor. Here is a screenshot:
79326-notworking.png

If you want my code here it is:

using UnityEngine;
using System.Collections;
using UnityEngine.UI;

public class ClickPlot : MonoBehaviour {


	void Start () {
	
	}
	

	void Update () {
	
	}

	public void kek (){

		print ("k");

	}
		

}

This problem seems to just have been happening recently. I could easily add a function to a button before, but it just seems to be appearing now. If you know what’s going on, please help!

You seem to have done everything properly. I have not run into any issues using buttons recently which version of Unity are you using? If you are trying out the 5.5 beta perhaps its a bug you’ll need to report.

Your code looks fine. Did you attach your script to the button?

Adding your script to the button: in the inspector of your button, click on “Add Component”, then type “ClickPlot” and select your script. Also drag and drop the button from the hierarchy to the “OnClick()” little box in the inspector where it says “None (Object)” (the one with the nipple button).