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

Are the graphics in a Canvas group with 0 alpha rendered?

Discussion in 'UGUI & TextMesh Pro' started by hessel_mm, Dec 16, 2014.

  1. hessel_mm

    hessel_mm

    Joined:
    Mar 12, 2014
    Posts:
    44
    Basically what it says in the subject line. I noticed that in overdraw view mode all my hidden panels show up, which would be quit suboptimal for (mobile) performance. So I wondered, are those elements rendered with 0 alpha or are they skipped in final builds?
     
  2. hessel_mm

    hessel_mm

    Joined:
    Mar 12, 2014
    Posts:
    44
    With a little more elaborations: I have multiple panels in my UI and I hide them by setting the alpha of their canvas groups to 0 (and the raycast blocking and intractable checkboxes off). I sort of assumed that setting the alpha to 0 would make the elements not render at all, but the editor's overdraw view suggests that it does render everything.

    Is this an editor "feature" or are all alpha 0 UI elements rendered in final builds too?
     

    Attached Files:

  3. phil-Unity

    phil-Unity

    Unity UI Lead Developer Unity Technologies

    Joined:
    Nov 23, 2012
    Posts:
    1,226
    I think atm they are drawn even if 0. We have a solution thats not finished that will hopefully solve this issue. for now if you put them on a new canvas and set the canvas alpha to 0 it should prevent the draw.
     
    arommelaere likes this.
  4. hessel_mm

    hessel_mm

    Joined:
    Mar 12, 2014
    Posts:
    44
    Ah, thanks for clearing that up!
     
  5. arommelaere

    arommelaere

    Joined:
    Jan 25, 2015
    Posts:
    3
    Did you solve this issue yet (v5.2.0)? I am developing a new multiplayer mobile game project, I use a lot of UI Panel with canvasgroup alpha set to 0 and it really seriously slow down my game with all panels superposed.
     
  6. GFX47

    GFX47

    Joined:
    Dec 7, 2010
    Posts:
    124
    I've opened a bug report about that issue and it has been "fixed for 5.3".
     
    arommelaere likes this.
  7. arommelaere

    arommelaere

    Joined:
    Jan 25, 2015
    Posts:
    3
    Thank you for your information, then I'm waiting 5.3 with big enthusiasm!