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

Discussion in 'UGUI & TextMesh Pro' started by Glockenbeat, Nov 27, 2014.

  1. Glockenbeat

    Glockenbeat

    Joined:
    Apr 24, 2012
    Posts:
    669
    I've been working with the new UI for a couple of beta releases - today I tried to add a mask component to a ScrollRect I have. However it was not working. The image was showing, yet the masking part did not work. I also tried to create a completely new canvas with two nested panels of which the parent of the last panel in the chain had a mask component attached, but to no avail too.

    Currently I am working on a project which has been present before the 4.6/beta releases, and here the mask component does not seem to work.
    There are no issues in a new project however. Also if I open the same project in Mac I can add a mask component and it'll directly do what it is supposed to do. Just not on my pre-existing project on the Windows PC.

    Any advises or similar experiences?
     
  2. Carpe-Denius

    Carpe-Denius

    Joined:
    May 17, 2013
    Posts:
    842
    What does your hierarchy look like?
     
  3. Glockenbeat

    Glockenbeat

    Joined:
    Apr 24, 2012
    Posts:
    669
    As mentioned, a plain setup like
    - Canvas
    --- Panel (masked)
    ------ Panel

    turned out to be not working.

    Yesterday late evening I tried to see what happens when the library gets recreated. After deleting the folder and having Unity recreate all its stuff, masks were working fine. So this seems to be a bug with upgrading an existing project to 4.6, at least to the final release, not sure if this was pre-existing in the beta releases as I did not work with masks then. I will do some further investigation on this later today and file a bug report.

    edit: Might be related to this issue:
    http://forum.unity3d.com/threads/new-ugui-mask-doesnt-work-for-some-android-devices.269186/
    The project I am using is set to Android.
     
  4. raynaldo

    raynaldo

    Joined:
    Oct 7, 2013
    Posts:
    15
    I have same problem on 4.6.1f1 and I have tried to delete the Library folder, but it is still not working.
    Do you also delete ProjectSettings folder or any other folder?

    Thanks
     
  5. spotavi

    spotavi

    Joined:
    Aug 30, 2014
    Posts:
    31
    I am using Unity 4.6.1p2. Not seeing mask as well.

    I tried and watched all tutorials. Still dont see the Mask working.

    Panel
    Scroll Rect with image masked
    text as child of scroll rect
     
  6. Carpe-Denius

    Carpe-Denius

    Joined:
    May 17, 2013
    Posts:
    842
    Can you pack an example scene? Just your mask image and some stuff for filling? Maybe your mask is wrong.
     
  7. raynaldo

    raynaldo

    Joined:
    Oct 7, 2013
    Posts:
    15
    delete Library Folder, switch platform, then restart unity did the trick for me.

    This problem only happens when you upgrade your project to 4.6.x
     
    sushanta1991 likes this.
  8. sushanta1991

    sushanta1991

    Joined:
    Apr 3, 2011
    Posts:
    305
    Thanks , this worked for me.
    in unity4.6.9 , suddenly my mask was not working, and than i found this thread :D