toggle switch visibility question

so if I wanted to set up a toggle switch to not be visible, but when certain requirements were met make it visible how would i write this code? here is what i had played with so far but it was not working properly.

    public Toggle myToggle;
   
    // Use this for initialization
    void Start ()
    {
       
        myToggle.gameObject.SetActive(false);
    }

    void Update ()
    {
        if(certain requierments are met..)
        {
           
            myToggle.gameObject.SetActive(true);   
        }
    }

how i understood this is that it would make the game object that all the pieces of the toggle are connected to not visible until after certain requirements were met, but this does not seem to be functioning as i would have thought. is there an easier way to make the whole toggle switch not visible at the beginning then have it appear when an if statement requirements are met?

thanks

What you’ve written should work. The error must be somewhere else.

ok cool, thank you! at least i know that i got that part right now, i will check into other areas.