If you want the button to do something in the new UI you can do something like this:
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
public class className: MonoBehaviour {
public void functionName (Object myObject) {
//Some code here
}
}
drag that to any object in hierarchy and under the OnClick() function, drag the object with script and you will see the option to select what you just did from the script you wrote.
I hope this is what you wanted
↧