Hi can someone tell me how to increase and decrease the material variable? I used example script on Unity Docs works fine but goes backwards and forward. I want to only increase and decrease by a certain number. Please advise? Thank you.
// Update is called once per frame
void Update () {
//float waterlevel = Mathf.PingPong(Time.time, 1.0F);
float waterlevel += 1.0f;
rend.material.SetFloat("_WaterLevel", waterlevel);
}
}