Search Issue Tracker

Fixed in 5.4.0

Votes

9

Found in

5.2.0f3

Issue ID

726249

Regression

No

UI elements with inverted scale become invisible when a part of it goes out of RectMask2D bounds

UI

-

Steps to reproduce:

1. Open the attached project (rect_mask_test.zip)
2. Open 'Test' scene
3. Notice it has a red image created as a child of white image with a 'Rect Mask 2D' component. Also notice that the red image is scaled to -0.5 on Y axis.
4. Move the red image down until a part of it goes out of the rect mask bounds
5. Notice the red image becomes invisible (Same happens with buttons, input fields, etc)

Note: The image only disappears if it goes out of the rect mask on the same axis it has an inverted scale (that is, if Y scale is inverted, you have to move the red image along Y axis to see it disappear, if X scale is inverted - you have to move it along X axis).

Comments (3)

  1. gabriellp21

    Oct 19, 2016 04:08

    Still persist in 5.4.1p4.

  2. karl_jones

    Nov 20, 2015 17:16

    This is now fixed and will be available in the future.

    The fix is very small and to the open-source side of the UI framework so if you need it now then you can download the framework from https://bitbucket.org/Unity-Technologies/ui and modify the file MaskableGraphic.cs.

    Change line 93 from :
    var cull = !validRect || !clipRect.Overlaps(canvasRect);
    to:
    var cull = !validRect || !clipRect.Overlaps(canvasRect, true);

  3. Immu

    Nov 07, 2015 14:00

    Still present in 5.2.2.p2

Add comment

Log in to post comment