Normally when anchors are on the same position, we can use .sizeDelta
or .rect.width/height
from RectTransform
, but if the anchor are stretched, both of them returns negative values:
Which in reality is not 5 in size at all:
There are already SetSizeWithCurrentAnchor
but how to get other's RectTransform
's absolute size?
.rect
equal? \$\endgroup\$.rect.width
shows -900,.rect.height
shows -5, it doesn't show because i'm using panning tool instead of resize tool, but the real size is really should be as big as the picture above (not -5, not -900, about 180 x 150-ish) \$\endgroup\$