The code that I’m using is from the old Survival Shooter that Unity used to host. I’m getting the error that damageImage is null, but I can see it in the Inspector. There is no actual image, I’m using the color attribute. I’m hoping that I’m just missing something simple, but I’m not sure I’ve provided enough information. I’m using Unity 2021
void Update ()
{
if(damaged)
{
damageImage.color = flashColour;
}
else
{
damageImage.color = Color.Lerp (damageImage.color, Color.clear, flashSpeed * Time.deltaTime);
}
damaged = false;
}