void Start()
    {
        CustomMessages.Instance.MessageHandlers[CustomMessages.TestMessageID.NetworkMessage] = this.handleNetworkMessage;

        SharingSessionTracker.Instance.SessionJoined += Instance_SessionJoined;


        try
        {
            theClient = new UIVA_Client_WiiFit(ipUIVAServer);
        }
        catch (Exception ex)
        {
            Debug.Log(ex.ToString());
        }
        displayMessage = "Press 'P' to start recording data";
        sb             = new StringBuilder();
        sb.Append("System Time,Elapsed Time,Gravity X,Gravity Y, PathX, PathY, Path, Weight\n");
        StartCoroutine(WriteInFile());
    }
    void Start()
    {
        play = false;
        hit = 0;
        miss = 0;

        //Time.timeScale = 0;

        head = GameObject.FindWithTag ("Head");

        if (head == null) {
            Debug.Log ("Cannot find 'Head' of the avatar");
        }
        try {
            theClient = new UIVA_Client_WiiFit (ipUIVAServer);
        } catch (Exception e) {
            Debug.Log (e.ToString ());
        }
        displayMessage = "'P' to \nplay";
        balanceDataRecorder = new StringBuilder ();
        balanceDataRecorder.Append ("System Time,Elapsed Time,Gravity X,Gravity Y, PathX, PathY, Path, Weight, Hit, Miss\n");
        StartCoroutine (SpawnWaves ());
        StartCoroutine (WriteInFile ());
    }