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 hides everything?

Discussion in 'UGUI & TextMesh Pro' started by Rob-Howard, Sep 5, 2014.

  1. Rob-Howard

    Rob-Howard

    Joined:
    Sep 4, 2014
    Posts:
    9
    Hey everyone, my first post and I have quite an annoying problem! :D

    I looked at the example's for the 4.6 UI, particularly the scroll/masking. It works well in the example but for me...not so much.

    In my scene, I have it set up identical to the example (unless I'm missing something) and when I apply the mask to the scroll content panel, all children disappear, whether or not the children are "in view" of the mask. (Hopefully that makes sense)

    I've tried just about everything to get it to work and I'm sure I'm overlooking something simple. How can I make the mask not just make all the children disappear?

    Thanks!
     
    panderson9149 likes this.
  2. Rob-Howard

    Rob-Howard

    Joined:
    Sep 4, 2014
    Posts:
    9
    Nevermind, figured it out - had to do with the alpha channel in the image settings! If you set the alpha to 2 or 3, it works while having an invisible (basically) background. Setting it to 0 masks everything. Hope this helps someone else! :)
     
    radiantboy and panderson9149 like this.
  3. Senshi

    Senshi

    Joined:
    Oct 3, 2010
    Posts:
    556
    If you want to get rid of the mask image entirely, please note there's a toggle for that inside the Mask Component. =)
     
    radiantboy likes this.
  4. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,593
    thanks guys, im assuming this is a great optimisation, I have hundreds of off screen tiles :) though I see no improvement at all in profiler or stats.
     
  5. Chris_Payne_QS

    Chris_Payne_QS

    Joined:
    Jul 16, 2016
    Posts:
    83
    It's not an optimisation at all; it's actually MORE work to apply a per-pixel mask. It just allows you to make neat windows into larger lists or maps. Offscreen tiles should already be culled by the frustum clipping.