# Changing an Image's alpha through an animation in Unity

I'm trying to change an Image's alpha through a legacy animation in Unity, so that it fades in and out in a loop. The animation works: I can see the color updated in realtime in the inspector. But the Image is not actually being updated. I know that it is possible this way, since changing the alpha manually in the inspector does change the opacity of the Image.

I could write a script for this, but would prefer to do it through an animation.

• What shader are you using to render? – jgallant May 28 '15 at 13:10
• @Jon As far as I know, Image does not have a shader. And I think I know what you're getting at. It's capable of using the alpha channel: I'm drawing a png with transparent regions. – Simon Verbeke May 28 '15 at 13:15
• @Jon Aha, didn't think of that. But I'm not using any material, my Image is simply a Sprite. Changing the material to Sprite-Default doesn't work either. – Simon Verbeke May 28 '15 at 13:24
• I tested this, and it works for me. I created a Canvas, then I created an Image, then I created an animation and set the Color value to alpha 0. Ran it, and the Image dissapears as expected. Can you post a screenshot of your setup maybe? i.imgur.com/W6uDMsf.gif – jgallant May 28 '15 at 13:38
• @Jon Ah, but that's the new animation system, if I'm not mistaken. I'm using the legacy system. Guess I'll have to get familiar with that one then – Simon Verbeke May 28 '15 at 13:45