# How to fade determine properties to fade materials out for the line renderer

I am trying to fade consistently fade a Line Renderer by adjusting the color property of it's material. I got the code I'm using from the accepted answer to How can I fade a game object in and out over a specified duration?. When I used the Default-Line material for the line renderer I got the following error:

Assertion failed: Material doesn't have a color property '_Color' UnityEngine.Material:get_color()

When I used the Default-Diffuse material, nothing happened.

Finally, when I used the Sprites-Default material it worked perfectly.

How can I make the line renderer fade out consistently based on different material?

• "Finally, when I used the Sprites-Default material it worked perfectly." So, is your problem solved? Was there something about using the Sprite material that was not "consistent" in the way that you want? – DMGregory Jan 31 '18 at 13:04
• @DMGregory I want the fade code to work with all materials, for example it's not working with the Default-Diffuse. – OnlyCodeMatters Jan 31 '18 at 13:34
• That won't happen. Not every material does alpha blending with the pixels behind it. Default-Diffuse is an opaque material — changing its alpha would not render it translucent. – DMGregory Jan 31 '18 at 13:36