Just tryng to get onlcik to work (simple answer)

So I have a button and when I click it I want to run a method application.quit. The script is ‘quit’. I can see this but not the method of ‘ExitGame’. I can not see the method to select it in the editor.

here is the code
using UnityEngine;
using System.Collections;

public class Quit : MonoBehaviour 
{
	void ExitGame () 
	{
		Application.Quit();
	}
}

71010-capture.png

So I attached the script to the button.
I dragged the button into the slot.
I opened slot 2 and found the script.
However, the method is not there. What Am I doing wrong?

This needed a 'public to be added. It took a while of going though messages, but this probably will answer most people looking for the answer. It needs to be made public in the script.

public void ExitGame ()