I’m creating a game with a start menu. In the start menu, I currently have two buttons:
The functions are in the same script, I have added the functions to the onclick events of the buttons but only the quit button works.
If I click the Play Button, nothing happens. I have already tried to load the scene using build index and scene_name
Now some screenshots:
First of all I’m pretty sure methods need to be capitalized but I I could be wrong. Either way it’s just good practice.
Secondly, have you added the scene to the build index under build settings?
If so, the only other thing I can think of is your target graphic or raycasting. If the target graphic is offset from where your source image is then you aren’t actually clicking the button. And as for raycasting. Make sure, there’s no other UI with “Raycast Target” enabled that might be rendering over top your button. Like a panel or something.
To your method to make sure it’s being called.
Thanks a lot for your answers, but the only reason why it didn’t work is that the onclick events were set to off.