Changing rect of UI parent with mask component to reveal masked child object

It seems a simple functionality. I have an image child object utilizing the parent’s mask component. During runtime, i could change the rect of the parent image to change the size of the mask to reveal more of the child’s image, however this changes the child objects size too, so it doesn’t really work without resizing the child images rect transform within code in the opposite direction. Is there a simpler way to accomplish this with just the UI components and coding the resizing of the parents size only?

EDIT: I guess within the code every time i adjust the parent’s rect transform i could disable and re-enable the mask, though its incredibly un-optimized and ridiculous, especially when adjusting the size every update.

EDIT: It looks like in the 2D experimental preview theres sprite masking without parenting objects… hmm… whats the 2D experimental preview? lol

i could change the rect of the parent image to change the size of the mask to reveal more of the child’s image, however this changes the child objects size too

this strongly suggests you haven’t set up the RectTransform anchors & offsets the right way for what you want.

try making the min & max anchor positions all be [0.5, 0.5].

I am trying to do a similar thing. I have my mask animated to reveal the child. But the child animates with the mask. Besides counter animating the child to the parent, I don’t know any other way to fix this.