using UnityEngine;
using System.Collections;
public class Buttons : MonoBehaviour {
public void buttonClick(int num = 0) {
Debug.Log("Clicked");
print ("Hello");
}
}
Buttons.cs
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.