So when I create a UI button I’m unable to test it when I hit the play button. Any suggestions on what to do? I’ve put the canvas on the top of all the objects but that didn’t fix it. Though it does work when I build and play it. Thanks in advance
Hmm, have you updated to the latest release? (4.6.3/5.0.0f4)
You should have no issues using the UI in the editor pressing play, especially if it is working on a platform
1 Like
You should call it in a script.
For example if you want to print “hello” on button click write following code in c# script-
public void OnClickButton()
{
print(“hello”);
}
after this,attach this to any game object and drag that gameobject in to OnClick() function defined in button inspector and select OnClickButton() function from drop down.
It was so basic lol I had 4. Thanks for the help