No touch position (android)

Hello!

I can’t get positions from my touches on the screen. I get the amount of touches, but no phases or positions.
If I use the old Input, it works as intended.

Here is my code (sorry for the bad formatting, I’m writing from a phone):

Update(){

ts = UnityEngine.Experimental.Input.Touchscreen.current;

int num = ts.activeTouches.Count;
        Vector2 pos3;

        if(num > 0)
        for(int i = 0; i < num; i++)
        {
            pos3 = ts.allTouchControls[num].ReadValue().position;
print(i + "   " + "pos3: " + ts.allTouchControls[i].ReadValue().position);
print(i + "   " + "phase: " + ts.allTouchControls[i].ReadValue().phase);
}

int num2 = Input.touchCount;
        Vector2 pos5;

        if(num2 > 0)
        {

            for(int i = 0; i < num2; i++)
            {
                pos5 = Input.touches[i].position;

                print(i + "   " + "Input.position: " + pos5);
                print(i + "   " + "Input.phase: " + Input.touches[i].phase);

            }
        }
}

What am I doing wrong?

Edit. I’m using Unity 2018 LTS and the experimental input system. (So I can get rid of the latency from the old one on Android devices.)

BR
/Lucas

This is now fixed. I upgraded to 2019 LTS. That also solved my headache with Unity IAP :slight_smile:

It doesn’t weigh up enough for all the headache, to give ‘good job’ shout out :wink: