- Home /
Images blocking buttons?
Hey, I'm a complete beginner, and after a series of tutorials on youtube, I have individually created a small game of tic-tac-toe. My problem is, when trying to design the menu, the background photo ends up over the button. I have been moving things in the hierarchy (making the canvas rest further up than the image) to no avail. Anyone help me please?
Answer by gibber10 · Jun 09, 2017 at 08:44 PM
Both image and buttons need to be a child of the Canvas. However your buttons should be lower down in the hierarchy than the background image. That will put them on top of the image. Also, making them a child of the Image gameobject will put them on top, which is best depends on your setup.
Answer by strangecloudsworkmail · Jan 01, 2019 at 09:23 PM
EDIT:
Ok, so I figured it out. What I had was a gameobject with: "Transform, sprite renderer, and my custom FollowMouse script." What I needed was a rect transform, Image, and the script on my cursor object. The parent canvas should be set to "Overlay." I had to do a bit of tweaking to my script to get the point to follow the cursor properly, but the image is appearing on top everything now.