Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Sprite Mask UI Mask/Mask2D interaction

Discussion in '2D Experimental Preview' started by ortin, Jun 15, 2016.

  1. ortin

    ortin

    Joined:
    Jan 13, 2013
    Posts:
    221
    Hi,
    just wanted to know if you guys have any plans to make it possible to use SpriteRenderers inside UI mask(s)?
     
  2. Johaness_Reuben

    Johaness_Reuben

    Unity Technologies

    Joined:
    Jan 27, 2016
    Posts:
    253
    No plans on it. Could you share how you would use it?
     
  3. ortin

    ortin

    Joined:
    Jan 13, 2013
    Posts:
    221
    Well, honestly not even sure, but I just have a strong feeling that UI and SpriteRender just have to play better with each other :)
    Our casual game is heavily UI based (different lists, chats, game elements etc) and UI isn't really friendly to animation (hello Canvas batching), receiving shadows, physics... So sometimes there's an idea to "hijack" some parts of UI using SpriteRenderers. But it's so painful to do it now: no proper RectTransfrom support (i.e. width / height), no masking support so you cannot put something in a UI list or container, no easy way to ensure proper rendering order.
     
  4. atitoHW

    atitoHW

    Joined:
    Nov 12, 2017
    Posts:
    3
    Late to the party here, but the Visible outside mask stuff is ideal for doing contextual help highlighting allowing you to darken the screen for text etc but put the mask hole over the the element you are wanting to draw the users attention to. There are other ways to do it but it would be elegant to do it with the sprite mask.