how to turn on and off a Sprite renderer code example
Example: how to turn off sprite renderer in unity
public Renderer rend;
void Start()
{
rend = GetComponent<Renderer>();
rend.enabled = true;
}
public Renderer rend;
void Start()
{
rend = GetComponent<Renderer>();
rend.enabled = true;
}