The first time I tried this out, I couldn't get it to work. I was changing the opacity of the UIPanel using the alpha field but the UITexture inside the panel wasn't fading.
Long story short, you need to change the Shader of your UITexture to something like Unlit/Transparent Colored:
And this will give you the result you desired:
This is how it can be done programatically in C#:
var uiTexture = powerupTexture.AddComponent<UITexture>(); uiTexture.shader = Shader.Find("Unlit/Transparent Colored");