public class MainMenu : MonoBehaviour { public void QuitGame() { Application.Quit(); } } //add QuitGame to the Button On click Function //Fill the object accordingly