// Start is called before the first frame update
        //It gets all the unity objects needed on this script, makes the menu invisible
        //Get an instance of the server connection
        //set the button events
        void Start()
        {
            scoreBoardCanvas.enabled = false;
            serverConnection         = ServerConnection.getInstance();

            GameObject mainMenuWindow = GameObject.Find("MainMenuWindow");

            mainMenuLogic = mainMenuWindow.GetComponent <MainMenuLogic>();
            mainMenuButton.onClick.AddListener(MainMenuClick);

            GameObject personalBoardWindow = GameObject.Find("PersonalBoardWindow");

            personalBoardLogic = personalBoardWindow.GetComponent <PersonalBoardLogic>();
            personalBoardButton.onClick.AddListener(MyStatsClick);
            searchButton.onClick.AddListener(SearchDatesClick);
            myGames.onValueChanged.AddListener(MyGamesClick);
        }
    //Start is called before the first frame update
    //It gets all the unity objects needed on this script, makes the infoLog invisible
    //Get an instance of the server connection
    //set the button events
    //Executes the function to connect to the server for the first time
    void OnSceneLoaded(Scene scene, LoadSceneMode mode)
    {
        Debug.Log("Loading Message_Parser");

        GameObject infoLogObject = GameObject.Find("InfoLog");

        infoLogObject.GetComponent <Canvas>().enabled = false;
        infoLogAnimator = infoLogObject.GetComponent <Animator>();


        GameObject loginWindow = GameObject.Find("LoginWindow");

        loginLogic = loginWindow.GetComponent <LoginLogic>();
        GameObject informationWindow = GameObject.Find("InformationWindow");

        informationLogic = informationWindow.GetComponent <InformationLogic>();
        GameObject registerWindow = GameObject.Find("RegisterWindow");

        registerLogin = registerWindow.GetComponent <RegisterLogin>();
        GameObject mainMenuWindow = GameObject.Find("MainMenuWindow");

        mainMenuLogic = mainMenuWindow.GetComponent <MainMenuLogic>();
        GameObject gameCreationWindow = GameObject.Find("GameCreationWindow");

        gameCreationLogic = gameCreationWindow.GetComponent <GameCreationLogic>();
        GameObject invitationWindow = GameObject.Find("InvitationWindow");

        invitationLogic = invitationWindow.GetComponent <InvitationLogic>();
        GameObject joinAGameWindow = GameObject.Find("JoinAGameWindow");

        joinAGameLogic = joinAGameWindow.GetComponent <JoinAGameLogic>();
        GameObject scoreboardWindow = GameObject.Find("ScoreboardWindow");

        scoreBoardLogic = scoreboardWindow.GetComponent <ScoreBoardLogic>();
        GameObject personalBoardWindow = GameObject.Find("PersonalBoardWindow");

        personalBoardLogic = personalBoardWindow.GetComponent <LoginUI.PersonalBoardLogic>();
        connectToServer();
    }