Why do my objects in my UI need to be outside the white border line

I have a canvas object and buttons attached to this
but why if i want my buttons at the top of the screen do i have to move it further past the border. its hard to judge where the actual screen border is. Do i need some code on my camera to make this translate correctly?

any help appreciated.

Are you saying the button transform has to be outside of the canvas region? If so I’ve never heard of nor experienced that problem.

Is the canvas set to screen space overlay? If not, then the camera could be just above the region, which would lead to that problem I would assume.

Yes the canvas is set to screen space overlay…

“the camera could be just above the region, which would lead to that problem I would assume.”

sorry i dont know what you mean by this.

i have attached an image, see how far down my buttons have to be in order to keep them near the bottom of the screen.

What I meant was, if the canvas was not screen space over lay, that you could have had the camera facing correctly but positioned to high. Causing you to have to raise the rect above the canvas region.

from the looks of the image… if I’m understanding you correctly… I apologize if I’m not. You want the buttons to be positioned in game screen where you have them in the photo. That white box is the render region so as of that photo you are outside the render region. So when you play the scene they are not visible. Do you “move them way up” in order to see them. But you’re actually just moving them into the render region. So think of that white box “canvas” as your screen representation. So placing anything inside of that, is the position it will be on screen.

I hope I understood you and answered your dilemma.

lets say i want a button in the top right corner of the screen
if i place it at the top right corner within the white box render region it is displaying in the middle top right of the screen when i run the build.
thats why i have to move it to the outside of the render region to display correctly in the build

i hope this clarifies a bit more the problem im having.

Is canvas set to scale with screen size?

Sorted!!! working beautiful!! that was driving me mad…thanks, will never forget that setting again!!!

1 Like

Haha good deal!

1 Like