I want to achieve color blending functionality and unable to achieve it through color.lerp function its too fast and cant controll the speed is there any other way to do this?
you need to update the value of last parameter in Color.Lerp yourslef
float progress = 0;
void Update () {
if(!blendAgain){
highlightObject.renderer.material.color = Color.Lerp(Color.gray,Color.black, progress); // If I use above declared colors instead of gray and black it doesn't work at all
}else{
highlightObject.renderer.material.color = Color.Lerp(Color.black,Color.gray, progress);
}
progress += Time.deltaTime
if(highlightObject.renderer.material.color == Color.black){
blendAgain = true;
}else if(highlightObject.renderer.material.color == Color.gray){
blendAgain = false;
}
}