void HideGameObjects() { GameObject modeManagerGameObject = GameObject.Find("Mode Manager"); ModeManager modeManager = modeManagerGameObject.GetComponent <ModeManager> (); modeManager.HideAllComponents(); }