Search Unity

Unity UI Making panels opaque?

Discussion in 'UGUI & TextMesh Pro' started by Ethan_dale, Mar 16, 2018.

  1. Ethan_dale

    Ethan_dale

    Joined:
    Feb 14, 2018
    Posts:
    10
    So I changed the color of my panels to the darkest black that they can go. They still show up as grey though, because the panels are very see through. Is there a way to make a panel be 100% opaque without adding a png image or something to it? Thanks.
     
    AmyJonas likes this.
  2. Sun-Dog

    Sun-Dog

    Joined:
    Mar 23, 2009
    Posts:
    144
    With no SourceImage in the Image(Script) on a "UI Panel" you should have full control over the color and opacity/alpha of the panel.

    Make sure that you don't have a Canvas Group on a parent Element that could be affecting the child panel.

    This is full white and fully opaque:

    67170c9f110eb818c6ce59cd48d22aac.png

    Full black also works by changing the RGB values to 0.

    Does this help?
     
    llu18 and Heavensrain88 like this.
  3. Ethan_dale

    Ethan_dale

    Joined:
    Feb 14, 2018
    Posts:
    10
    Ah, I have everything under a canvas...we're developing for Android, so my instructor said we needed that. Not sure if he's just "dumbing down" Unity for us, or if that's actually a thing... We were introduced to Unity for very specific augmented reality projects after using Unreal for almost 4 years, so it's been a wild and disconcerting ride, as we're not starting from the basics. Thanks for the tip!
     
  4. Sun-Dog

    Sun-Dog

    Joined:
    Mar 23, 2009
    Posts:
    144
    Ah - sorry!

    The Canvas Group is a special component to group many UI Elements on one canvas. This can be used to fade all of the elements in a group.

    https://docs.unity3d.com/Manual/class-CanvasGroup.html

    So, if you have a Canvas Group on the base canvas and it's partially transparent, so will all of children be partially transparent.

    Can you post screenshots of your components and what you see in the gameview or scene view and we'll be able to help you out more?
     
    DaniilPrivalov likes this.