Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

new uGUI mask doesn't work for some android devices.

Discussion in 'UGUI & TextMesh Pro' started by eXiin, Sep 18, 2014.

  1. eXiin

    eXiin

    Joined:
    Dec 23, 2013
    Posts:
    63
    I have many devices, and on one of them, the mask does not work correctly.
    Does someone have the same issue ?

    This is on a Wiko Clink Slim (Android 4.1.1)
    The English button does not use a mask, the rest does.
    If you look closely you can see that rounded borders have the color of the Image behind.
    Screenshot_2014-09-18-14-48-09.png

    This is on an Oppo Find5 (with android 4.4) and it work as expected
    Screenshot_2014-09-18-14-48-57.png
     

    Attached Files:

    rakkarage likes this.
  2. phil-Unity

    phil-Unity

    Unity UI Lead Developer

    Joined:
    Nov 23, 2012
    Posts:
    1,226
    Yes some android devices although they support the stencil API arnt behaving correctly (i know the original kindle fire is one). The android team is looking into this.
     
    rakkarage likes this.
  3. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,773
    karl_jones and eXiin like this.
  4. eXiin

    eXiin

    Joined:
    Dec 23, 2013
    Posts:
    63
    Is there any Issue report ? So I can follow it ;)
     
  5. FuguFirecracker

    FuguFirecracker

    Joined:
    Sep 20, 2011
    Posts:
    419
    @sebsmax
    Hey, Did you know that your Chinese language option doesn't actually read 'Chinese'? [中文]
    It reads 'Pinyin'... Which is the phonetic system for transcribing Mandarin...

    Maybe you already knew that... ;)
     
  6. phil-Unity

    phil-Unity

    Unity UI Lead Developer

    Joined:
    Nov 23, 2012
    Posts:
    1,226
    I'm not 100% sure where the bug is atm, all i know is someone on the android team is looking into it.
     
  7. eXiin

    eXiin

    Joined:
    Dec 23, 2013
    Posts:
    63
    @FuguFirecracker, Well I'm currently using placeholder as the game is not finished yet,afterwards I'll ask someone to translate it :)
    but thanks it's very kind of you to notify it to me!
     
  8. bruno963852

    bruno963852

    Joined:
    Sep 26, 2014
    Posts:
    2
    in beta 30 still the same problem, and it's very important to me to have a mask to scroll a text in a scrollrect...

    Is there any known workaroud?
     
  9. phil-Unity

    phil-Unity

    Unity UI Lead Developer

    Joined:
    Nov 23, 2012
    Posts:
    1,226
    nope no known work around that i've seen. when we fix it i'll be sure to mention it in the release notes.
     
  10. CDF

    CDF

    Joined:
    Sep 14, 2013
    Posts:
    1,307
    I've also seen some weird masking bugs on Android. On my Sony Xperia, elements inside a scrollRect and mask turn into hundreds of tiny pixels which vaguely make out the images they're supposed to be.
     
  11. iivo_k

    iivo_k

    Joined:
    Jan 28, 2013
    Posts:
    314
    Any news on this? 4.6b21 and scroll rects with masking break with OnePlus One.
     
  12. iivo_k

    iivo_k

    Joined:
    Jan 28, 2013
    Posts:
    314
    I tried an older b19 development build and it worked fine. Non-development b21 doesn't.
     
  13. mh114

    mh114

    Joined:
    Nov 17, 2013
    Posts:
    295
    Exactly this happens on OnePlus One as well (at least) in b21 release builds. Development build is somehow unaffected.
     
  14. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,221
    Are there any bug numbers?
     
  15. Ville

    Ville

    Joined:
    Oct 5, 2012
    Posts:
    19
  16. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    Masks don't seem to work correctly on the Galaxy Nexus running Android 4.2.2. This is for Unity 4.6 RC1
     
  17. SherMax

    SherMax

    Joined:
    Jun 6, 2014
    Posts:
    1
    Hello.
    Bug looks like mask's image is drawn like usual image - and we see only white image instead of items under mask.

    I have reproduced this bug with 4.6b20 on two devices:
    Highscreen Alpha GTR
    LG Optimus L4
    both uses video-chip PowerVR SGX531

    Hope, it can help you to fix it.
     
  18. Keyjin

    Keyjin

    Joined:
    Nov 28, 2013
    Posts:
    16
    Hello guys,

    are there any news ? Because i have the same Problem...

    -Keyjin
     
  19. Keyjin

    Keyjin

    Joined:
    Nov 28, 2013
    Posts:
    16
    push...
     
  20. mog-mog-mog

    mog-mog-mog

    Joined:
    Feb 12, 2014
    Posts:
    266
    Reported on B17, still available on RC3. Filed bug as well...
     
    Keyjin likes this.
  21. eXiin

    eXiin

    Joined:
    Dec 23, 2013
    Posts:
    63
  22. Keyjin

    Keyjin

    Joined:
    Nov 28, 2013
    Posts:
    16
    Alright, thanks for the reply guys :)!
     
  23. Yury-Habets

    Yury-Habets

    Unity Technologies

    Joined:
    Nov 18, 2013
    Posts:
    1,167
    This issue is fixed for the first patch-release which happens after 4.6.
     
  24. Keyjin

    Keyjin

    Joined:
    Nov 28, 2013
    Posts:
    16
    Alright, i will check it and give then feedback

    EDIT:

    The Bug is not fixed for me

    I also tried untick/tick 32/24-bit Depth Buffer

    PC



    Handy


     
    Last edited: Nov 27, 2014
  25. rakkarage

    rakkarage

    Joined:
    Feb 3, 2014
    Posts:
    683
    next patch he said
     
    Keyjin likes this.
  26. Keyjin

    Keyjin

    Joined:
    Nov 28, 2013
    Posts:
    16
    ow ok.... my fault :D
     
  27. mog-mog-mog

    mog-mog-mog

    Joined:
    Feb 12, 2014
    Posts:
    266
    Thanks, looking forward to it.
     
  28. Victor_Kallai

    Victor_Kallai

    Joined:
    Mar 5, 2014
    Posts:
    123
    We've been seeing the same bug on both Android and iOS (specifically Nexus 5, Moto G, iPhone5 and iPad 2) Really looking forward to the fix as we're scheduled to launch on December 10th.
     
    Keyjin likes this.
  29. paradizIsCool

    paradizIsCool

    Joined:
    Jul 10, 2014
    Posts:
    178
    Did p1 solve the problem for all of you ? our tests seems to say no !
     
  30. Yury-Habets

    Yury-Habets

    Unity Technologies

    Joined:
    Nov 18, 2013
    Posts:
    1,167
    4.6.0p1 should work.
    If it does not work for you - please make sure you have a camera in your scene to have framebuffer cleared.
    If it still does not work - please submit a bug report, and note which devices you are using.
     
    Ilona and rakkarage like this.
  31. mog-mog-mog

    mog-mog-mog

    Joined:
    Feb 12, 2014
    Posts:
    266
    yes, it works for me in 4.60p1
     
    Yury-Habets likes this.
  32. iwaldrop

    iwaldrop

    Joined:
    Sep 3, 2012
    Posts:
    9
    Tested with Unity v4.6.1f1. Release notes state, "Android: Fixed Unity UI ScrollView/Mask on PowerVR SGX."

    With camera in the scene, this does not work for me on a gen1 Motorola Xoom. When mask is disabled, UI is visible.

    Specs:
    - http://www.gsmarena.com/motorola_xoom_mz604-3833.php
    - Android 4.1.1
     
  33. eXiin

    eXiin

    Joined:
    Dec 23, 2013
    Posts:
    63
    it's fixed for me with the 4.6.1 !
    Thanks guys
     
  34. InsomniakDev

    InsomniakDev

    Joined:
    Jun 23, 2014
    Posts:
    12
    I'm having a problem which doesn't seem to be same as others, the UI Mask simply doesn't work on a Nexus 7 wifi tablet, the masked element is showing entirely.

    Mine is on Android 4.1.2 and my coworker's one is working on Android 4.4.4, both don't "display" the mask.

    I'm working on Unity 4.6.1f1 and I have been waiting for it thinking it would solve this problem.

    This is a 2D game working with an orthographic camera.
    Here are two screenshots, the first on the Nexus 7 and the other on my iPad mini 3 displaying the mask working :

    Can anyone confirm this is another problem and not the same as the one reported here?
     
  35. mog-mog-mog

    mog-mog-mog

    Joined:
    Feb 12, 2014
    Posts:
    266
    I cannot see the difference. I've tested mask on nexus 7 wifi with 4.4.2, worked okay.
     
  36. InsomniakDev

    InsomniakDev

    Joined:
    Jun 23, 2014
    Posts:
    12
    the difference is the round corners on the dark part,
    can you tell me what year is your nexus 7 ?
    Thanks
     
  37. InsomniakDev

    InsomniakDev

    Joined:
    Jun 23, 2014
    Posts:
    12
    Update : I don't encounter this problem when using "Screen Space - Overlay" instead of "Screen Space - Camera" on the Canvas.
    That doesn't help me much since I need to use "Screen Space - Camera" to display some SpriteRenderer (with an Animator component) in my UI.
     
  38. mog-mog-mog

    mog-mog-mog

    Joined:
    Feb 12, 2014
    Posts:
    266
    I am using "Screen Space-Camera" mode. Tested on 2012 late nexus 7.
     
  39. InsomniakDev

    InsomniakDev

    Joined:
    Jun 23, 2014
    Posts:
    12
    So then I guess it must be some option(s) you have in your project or camera that makes it works.
    Could you help me there?
     
  40. rakkarage

    rakkarage

    Joined:
    Feb 3, 2014
    Posts:
    683
    oh! it is because the corners are transparent!? i do not think it supports shaped / transparent masks? just rectangle / square? idk
     
  41. InsomniakDev

    InsomniakDev

    Joined:
    Jun 23, 2014
    Posts:
    12
    hmm I'm pretty sure it does as shown in this tutorial :
     
    rakkarage likes this.
  42. rakkarage

    rakkarage

    Joined:
    Feb 3, 2014
    Posts:
    683
    4.6.1 fixed it for me too on an old galaxy nexus
    maybe try just a simple example with just two default sprites? if that works maybe the problem is something else idk sorry
     
  43. InsomniakDev

    InsomniakDev

    Joined:
    Jun 23, 2014
    Posts:
    12
    Tried what you sayed, it worked.
    So clearly the problem comes from my UI, I'm working on it.
    Clearly not the same problem as before then.
    I'll give my problem's solution when i find it for those that would eventually get it.

    Thanks
     
  44. mog-mog-mog

    mog-mog-mog

    Joined:
    Feb 12, 2014
    Posts:
    266
    Here is player setting, canvas and camera, please let me know if you need anything else..
     

    Attached Files:

    InsomniakDev likes this.
  45. InsomniakDev

    InsomniakDev

    Joined:
    Jun 23, 2014
    Posts:
    12
    Alright, so i found the origin of my problem, i'm using a Frost Effect script on my camera ( http://u3d.as/content/steven-craeynest/frost-effect/3CY ) but any Image Effects script will make the mask uneffective.

    I guess this is a new issue, so the problem is :
    Image Effects (pro) used on the camera rendering the UI disable the new UI mask effect on the Nexus 7 but maybe on other devices as well.

    @rakkarage @lilboylost Thanks for your help
     
  46. comworm

    comworm

    Joined:
    Aug 13, 2014
    Posts:
    11
    I am still having this problem on my project with 4.6.1f1.
    It happens in Editors with Android platform as target.
    Please take a look at this image.
    It happenes in both Scene window and Game window.

    upload_2014-12-22_17-57-15.png

    When I test it on new scene, bug still happens.
    But when I test it on new project, there is no problem.
    Is it something about my project setting or camera setting?
    I am using 'Screen Space - Overlay'
     

    Attached Files:

  47. comworm

    comworm

    Joined:
    Aug 13, 2014
    Posts:
    11
    I just found the reason of my problem.
    Project setting -> Player -> Android -> Use 24-bit Depth Buffer should be 'Checked'.
     
  48. goat

    goat

    Joined:
    Aug 24, 2009
    Posts:
    5,182
    I just targeting Android 4.4 KitKat & above to avoid these bugs. It makes performance not just looks bad.
     
  49. Thom Denick

    Thom Denick

    Joined:
    Jul 12, 2010
    Posts:
    32
    Thanks for figuring that out comworm. That fixed it for me in the editor after restarting U3D. Would have never guessed a PlayerSetting could affect Editor rendering.
     
  50. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    Well... My UI elements aren't even SHOWING on my pendo pad, yet it works fine on my laptop. any ideas? o_O

    I also got pink shaders with fx using the stencil buffer on the same tablet! :(