// Start is called before the first frame update
    void Start()
    {
        List <InputDevice> devices = new List <InputDevice>();

        InputDevices.GetDevicesWithCharacteristics(controllerCharacteristics, devices);

        RightHand = devices[0];

        RightHand.TryGetFeatureValue(CommonUsages.primaryButton, out bool buttonValue);



        Text_Pro_script Text_1;
        Text_Pro_script Text_2;

        Text_1 = GameObject.Find("Text_1").GetComponent <Text_Pro_script>();
        Text_2 = GameObject.Find("Text_2").GetComponent <Text_Pro_script>();

        //Text.textMesh = "";
        Text_1.TextUpdate("In MQTT's Start");
        Text_2.TextUpdate("In MQTT's Start");

        Debug.Log("mqtt Start()");
        base.Start();
        Debug.Log("base.Start() done");
        base.OnConnecting();
    }
    private void ProcessMessage(string msg)
    {
        List <InputDevice> devices = new List <InputDevice>();

        InputDevices.GetDevicesWithCharacteristics(controllerCharacteristics, devices);

        RightHand = devices[0];

        RightHand.TryGetFeatureValue(CommonUsages.primaryButton, out bool PrimaryButtonValue);
        RightHand.TryGetFeatureValue(CommonUsages.secondaryButton, out bool SecondaryButtonValue);


        Text_Pro_script Text_1;
        Text_Pro_script Text_2;

        Text_1 = GameObject.Find("Text_1").GetComponent <Text_Pro_script>();
        Text_2 = GameObject.Find("Text_2").GetComponent <Text_Pro_script>();
        Debug.Log("FPX Received: " + msg);

        GameObject go = GameObject.Find("MQTT_Cube");

        Debug.Log("go=" + go);

        Vector3 v = new Vector3(1.0f, 0.0f, 0.0f);

        go.transform.Translate(v, Space.World);


        Panel.SetActive(!Panel.activeSelf);
        Text.SetActive(!Text.activeSelf);

        Text_1.TextUpdate("Message reçu");

        //string Texte_affichage = "Température = " + msg +"°C";

        //Text_1.TextUpdate(Texte_affichage);
        Text_2.TextUpdate(msg);

        Text_1.TextUpdate(PrimaryButtonValue.ToString());
        Text_2.TextUpdate(SecondaryButtonValue.ToString());


        // Ajout pour publish un message a chaque fois qu'on en recoit un
    }