Is there a way to auto-set the min size for a texure rect based on its anchor points?

Godot Version

godot 4.0

Question

I can currently make the custom minimum size of a texure rect fit with its anchor points by a calculator and manually setting it up. Is there an easier method?

Why are you doing this? What does it mean to set minimum size by anchors?

so for example if my anchor point is set to left 0.2 right 0.4 and top 0.1 bottom 1 and my window setting is 1920 * 1080. I want my custom min size to fit with the anchor points i.e x = 1920 * 0.2 = 384 and y = 1080 * 0.9 = 972. I just dk if there is a way to automatically set this

It sort of defeats the purpose of anchors, you would have to make it a tool script. Do you want your game to only be played on screens larger than 1080p?

no, but if I don’t set a minimum size when I am adding a image to the texture rect that requires me to set expand mod into anything other than keep size the image shrinks to nothing. however if the minimum size is too big or too small the image is gonna stretch larger or smaller than where I expect it to be.

Sounds like a job for containers, anchors shouldn’t squash a texture rect down to nothing if the anchors are an area instead of a point/line

I will check that out, ty!