I want to know how to have a texture change values in order to play an animation of sorts through a coroutine. The current code I have is here:
IEnumerator Transition()
{
float cutoff = Mathf.Clamp(Time.time, 0, 1.0f); //need to find out how to make the animation play over time
rend.sharedMaterial.SetFloat("_Cutoff", cutoff);
yield return null;
}
I have clamped the values between 0 and 1, but I’m unsure on how to use the “time” function to get the result I’m looking for. Thanks in advance.