Search Unity

CanvasRenderer OnEnable SetAlpha

Discussion in 'UGUI & TextMesh Pro' started by Piflik, Mar 23, 2016.

  1. Piflik

    Piflik

    Joined:
    Sep 11, 2011
    Posts:
    292
    I am using the CanvasRenderer.SetAlpha() function to fade out UI elements. It works well most of the time, but at one position I deactivate gemeobjects, and when they are activated again, the CanvasRenderer's alpha value is reset to 1 instead of keeping the value it had before. Is that the intended behaviour?

    Edit: A short test tells me it already happens in OnDisable() (or earlier, Debug.Log in OnDisable returns 1, while in Update it prints the correct value)
     
    fd-software and Menion-Leah like this.
  2. Menion-Leah

    Menion-Leah

    Joined:
    Nov 5, 2014
    Posts:
    189
    Issue still present in 2017.3.0p1
     
  3. fd-software

    fd-software

    Joined:
    Nov 30, 2018
    Posts:
    3
    The problem still exists in 2018.4.10f1