I am wanting to add a button to my scene in order to mute/unmute music. I can add the button to my scene, but it's not appearing on the UI. I can't see it anywhere, not on the scene nor the game when running.

Below is a screenshot of the editor. You can see the button in front of the camera and in front of the scene itself, but it doesn't appear. I can't actually see a button, just a 'move' control'.

enter image description here

Things I have tried:

  • Changing the 'Layer' of the button to default
  • Adjusting the z-axis (I've tried 0, +1-5, -1-5)
  • Giving the Image (Script) a material inside the Inspector

The button has text, which isn't visible either.

I could create a sprite and do a raycast, but that seems like overkill just to do a simple click action.

Any ideas?


You need to make the Button a child of a Canvas.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.