how sprite renderer unity works 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;
}