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

Mask not working in b20?

Discussion in 'UGUI & TextMesh Pro' started by omatase, Nov 5, 2014.

  1. omatase

    omatase

    Joined:
    Jul 31, 2014
    Posts:
    159
    Can someone help me understand why the mask in the image below isn't working? I re-watched the tutorial on masks in the new UGUI but there's really nothing to it. Add an image component and mask component t a UI element, then control the masked area by changing the size of the rect on the element with the mask.

    However, in my scene nothing is being masked when I do it. This image should show everything I've done. no mask.jpg
     
  2. paradizIsCool

    paradizIsCool

    Joined:
    Jul 10, 2014
    Posts:
    177
    add an image source
     
  3. omatase

    omatase

    Joined:
    Jul 31, 2014
    Posts:
    159
    Thanks for the response paradizIsCool, I thought an image source might be important, but in fact the tutorial video states that it is not required for an image to be in the Image component. Only that an image component be attached. And that if the Source Image is empty it will use the bounds of the rect to apply the mask. In either case I have tried with and without an image source with the same result.
     
  4. omatase

    omatase

    Joined:
    Jul 31, 2014
    Posts:
    159
    Ah Ha! I got it! You have to make the content being masked a child of the masking object. Boo yah!