void Update () {
if (damaged) {
DamageScreen .Color = flashcolor;
} else {
DamageScreen.Color = Color.Lerp (DamageScreen.Color,Color.clear, flashspeed * Time.deltaTime);
}
damaged = false;
2 Answers
2Thank you for your response i found the problem myself. I made mistake in public as imageposition then it solved.
Seems like your “DamageScreen” has no Color property. I’m not sure what class it is, but you should look up that classes documentation. It could be that the property is called “color” (lowercase), or that you need a different component (eg sprite renderer has a color property).