Setting GameObjects inactive/invisible by default in GUI?

Hello.
I made a GUI with some GameObjects, but they are active, or in other words, they are visible when i start up the game. I want them to be invisible by default when i start up the game, but i cannot figure out where to do that in the code? Any help? :slight_smile:

Here is my code

    public GameObject[] objects;

    private void OnGUI()
    {
        foreach (GameObject go in objects)
        {
            bool active = GUILayout.Toggle(go.activeSelf, go.name);
            if (active != go.activeSelf)
            {
                go.SetActive(active);
            }
        }
    }

You mean something like this?

// [...]
public GameObject[] objects;

private void Start()
{
    foreach (GameObject go in objects)
        go.SetActive(false);
}

private void OnGUI()
{
    // [...]

You can just disable them in the Editor.