you want to set the button by: public Button ButtonName;
then in start you want to add listener: ButtonName.onClick.AddListener(ButtonFunction);
then add button function :void ButtonFunction()
{
Debug.Log("string here")
}
then you just drag the button to the inspector, set the onclick in inspector and the option would be under the name Nikita-ButtonName
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…