'Wiimote Unity won't update pointer

I need your help, I'm trying to get pointer value from my wiimote on Unity.

On my Scene I have only Light & MainCamera (with the script)

using UnityEngine;
using WiimoteApi;

public class scriptjeux : MonoBehaviour {


    private Wiimote wiimote;
    
    void Start() {
        WiimoteManager.FindWiimotes();
        wiimote = WiimoteManager.Wiimotes[0];
        wiimote.SetupIRCamera(IRDataType.BASIC);
        wiimote.SendPlayerLED(true,false,false,true);

    }

    void Update () {
        if (!WiimoteManager.HasWiimote()) {Debug.Log("No"); return; }

        int ret;
        do
        {
            ret = wiimote.ReadWiimoteData();
        } while (ret > 0);          

        float[] pointer = wiimote.Ir.GetPointingPosition();
        //ir_pointer.anchorMin = new Vector2(pointer[0], pointer[1]);
        //ir_pointer.anchorMax = new Vector2(pointer[0], pointer[1]);
        Debug.Log(pointer[0]);
        Debug.Log(pointer[1]);
      
    }
}

The data won't update

Thank for reply



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source