It looks like you're new here. If you want to get involved, click one of these buttons!
So for my game, I want to lerp the emission color and I have the below script. It doesn't work. Any help is greatly appreciated.
public class ChangeMaterial : MonoBehaviour
public GameObject player;
public Color newColor;
private void OnTriggerEnter(Collider other)
player.GetComponent<Renderer>().material.SetColor("_EmissionColor", Color.Lerp(player.GetComponent<Renderer>().material.color, newColor, 5 * Time.deltaTime));