Fugra
(Fugra)
May 18, 2025, 5:54pm
1
So i have some questions about using anchors and retrieving size / position from the canvas.
Im useing:
my canvas is setup like this:
but when i use my anchor like this:
it doesnt give me top right position anymore :o.
my questions are:
Is there a way to get top right position and use anchors properly spread out so i can auto resize my window?
When you use anchors as fill, it doesn’t have to give you the top right position anymore since your top right position will be always 0.0. Its anchored as fill.
TopRight will be 0,0 and bottom right will be whatever your viewport size is
Not sure what you doing but you can always wrap an element with another element like overlay.
Fugra
(Fugra)
May 18, 2025, 6:39pm
3
Does position get from the bottom right corner?
When you use anchors as fill screen, there is no position.
Basically no delta between viewport and viewportcanvas, they are both equal to ScreenSize.
What exacty you trying to do? Cause in your scripts (the last things we did) will work whatever size it is.
Fugra
(Fugra)
May 18, 2025, 9:12pm
5
Umm everything works fine btw Its just when i try to add wrap stuff around it :o
Doesnt Work with Elements wrapping:
Works with just the normal widget no elements wrapping:
When you add a wrapper around the element, the slot can change. There is many slots like CanvasSlot, OverlaySlot etc.
Fugra
(Fugra)
May 19, 2025, 2:13am
7
slot as canvas slot is the only one with size and position though?
and i still dont understand how im going to wrap that viewport widget