- Home /
color.lerp makes my sprite disappear
Hello... I am a beginner. I try to make a very beautiful background that changes color continuously. I looked at a tutorial and tried to apply the same code but when I start my game my sprite disappears. I did a few tests and noticed it disappears when I add: "GetComponent () ...". Can you tell me where the problem is?
Answer by xxmariofer · Jan 31, 2019 at 07:19 PM
Hello, remove the ".material" from the GetComponent line, if it doesnt work is because your colors arent set up in the editor, so click the sprite and check that the start and end color alpha is 1.
Thank you very much. I did not realize that the alpha was on 0. thank you very much for your help.
Your answer
Follow this Question
Related Questions
Color Lerp Problems 1 Answer
Color.Lerp doesn't work 1 Answer
Spawned Object Gradient Mesh Colors? 2 Answers
Lerping 2 values on a shader on button press. 1 Answer
Unity 2020.1 List index out of range and colors not changing smoothly 1 Answer