public class NewBehaviourScript : MonoBehaviour
{
private Button button;
// Start is called before the first frame update
void Start()
{
button=GetComponent<Button>();
button.clicked.AddListener(setDifficulty);
}
// Update is called once per frame
void Update()
{
}
void setDifficulty()
{
Debug.Log(gameObject.name + "clicked");
}
}