Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Negative Scale Prevents Masking in new UI

Discussion in 'UGUI & TextMesh Pro' started by Mikeysee, Sep 16, 2014.

  1. Mikeysee

    Mikeysee

    Joined:
    Oct 14, 2013
    Posts:
    155
    Im pretty sure this is a bug but ill post it here just incase its intended before I report it as a bug.

    If you use negative scale for flipping, then try to mask a negatively scaled image, it isnt masked.

    So for example, if you setup the hierarchy like:

    upload_2014-9-16_9-2-10.png

    Two images below a mask, the first image is masked fine:

    upload_2014-9-16_9-3-40.png

    However you can see that if you set the scale on the masked image to be a negative value it no longer respects the masking:

    upload_2014-9-16_9-3-9.png

    Negative scaling is important as its a common effect for "flipping" sprites.

    Here is the demo project: https://www.dropbox.com/s/7hph7gzaf0fj61e/NegativeScaleMaskingProblem.zip?dl=0

    Cheers,
    Mike
     
  2. phil-Unity

    phil-Unity

    Unity UI Lead Developer Unity Technologies

    Joined:
    Nov 23, 2012
    Posts:
    1,226
    There are already forum posts related to this, its due to seeing the graphics from the back which currently has a bug.
     
  3. Mikeysee

    Mikeysee

    Joined:
    Oct 14, 2013
    Posts:
    155
    Great, I thought that may have been the case, I wont file a bug report for this one, thanks Phil.
     
  4. unity_CKMn1B2P0hk_7Q

    unity_CKMn1B2P0hk_7Q

    Joined:
    Nov 12, 2020
    Posts:
    1
    Well, it still happen though.
     
  5. vizgl

    vizgl

    Joined:
    Nov 4, 2014
    Posts:
    61
    Yep, 7 years bug :)
     
    Last edited: Nov 10, 2021