UI Button - How to write the click function?

51691-screenshot-3.pngusing UnityEngine;
using System.Collections;

public class Buttons : MonoBehaviour {

	public void buttonClick(int num = 0) {
		print ("Hello");



I just created a button from GameObject (named it up)
TargetGraphic → I used one Image

For that button, I added a new component → Buttons.cs

Then, On Click {}
I dragged and dropped that button (up).
From the functions list, I chose buttons, then buttonClick

But when i try to click, i didn’t get log.

First of all, you can’t declare num = 0 when you’re declaring a variable as a parameter.
Second, this is pretty much all you need:

public void ButtonClick(){