Zmień jedność koloru w czasie
void Start()
{
// ... your other stuff
StartCoroutine(ChangeEngineColour());
}
private IEnumerator ChangeEngineColour()
{
float tick = 0f;
while (engineBodyRenderer.material.color != endColor)
{
tick += Time.deltaTime * speed;
engineBodyRenderer.material.color = Color.Lerp(startColor, endColor, tick);
yield return null;
}
}
M K