So i got this code because i wanted my object change colors in in a rainbow motion. But it gives me the error “The name `HSBColor’ does not exist in the current context” how can i fix that
TrailRenderer.startColor = new Color(HSBColor.ToColor(new HSBColor(Mathf.PingPong(Time.time * Speed, 1), 1, 1)));
The Original code i Copied
rend.material.SetColor("_Color", HSBColor.ToColor(new HSBColor( Mathf.PingPong(Time.time * Speed, 1), 1, 1)));
how can i get my code to work?