Search Unity

Canvas prevents parents CanvasGroup alpha from propagating down the hierarchy

Discussion in 'UGUI & TextMesh Pro' started by Devil_Inside, Jan 3, 2019.

  1. Devil_Inside

    Devil_Inside

    Joined:
    Nov 19, 2012
    Posts:
    1,119
    So imagine having 3 UI objects positioned one under another in the UI hierarchy: Layer0, Layer1, Layer2.
    - Layer0 has a CanvasGroup
    - Layer1 has a Canvas (that inherits the root canvas properties)
    - All 3 layers have an Image component attached.
    If I change the alpha on the CanvasGroup on Layer0, I expect all the layer images to fade out. However in 2018.3 this doesn't happen. Layer0 fades out just fine, but images on Layer1 and Layer2 stay fully opaque, unless I set the alpha to 0, at which point they suddenly disappear.
    It seems that the Canvas on Layer1 prevents the CanvasGroup alpha on Layer0 to propagate down the hierarchy to Layer1 and Layer2.

    This was working fine in 2018.1.9. Has anythings changed? Is this expected behavior?
     
  2. alvinw

    alvinw

    Joined:
    May 20, 2016
    Posts:
    1
    Try moving the CanvasGroup component to the same object that has the Canvas or it's children
     
  3. Devil_Inside

    Devil_Inside

    Joined:
    Nov 19, 2012
    Posts:
    1,119
    This was confirmed as a bug.