Search Unity

Using the Mask component on regular 2D Sprites?

Discussion in 'UGUI & TextMesh Pro' started by soundwav_, Oct 6, 2014.

  1. soundwav_

    soundwav_

    Joined:
    Apr 23, 2013
    Posts:
    12
    Hello,
    is there a way to use the Mask component on 2D sprites? I tried using it the 'normal' way without success.

    I thought the UI System is based on the 2D Sprite system at its core, so it would be kinda weird not having an easy masking option in the 2D system, but having it in the UI System.

    Please let me know if I'm missing something obvious here :)
    Thanks.
     
  2. phil-Unity

    phil-Unity

    Unity UI Lead Developer

    Joined:
    Nov 23, 2012
    Posts:
    1,226
    The rendering of the UI system is not the same as the 2D system. the only thing thats the same at the core is the fact that UI uses Sprites which are from 2D.

    To answer your question though, not its not possible. because a canvas renders all its elements as one group of drawcalls (i.e. nothing gets inbetween gui elements) and because the 2D elements dont get rendered before the mask is disabled it doesnt get masked.