Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Bug TouchPhase only returns Stationary

Discussion in 'Input System' started by MousePods, Oct 23, 2020.

  1. MousePods

    MousePods

    Joined:
    Jul 19, 2012
    Posts:
    754
    I updated to the latest preview package of the input system for a fix where TouchPhase.Began wasn't always called. Before I updated, my TouchPhase's were working. However, since I updated all I get is TouchPhase.Stationary. It never calls begin, move, or ended anymore.

    Code (CSharp):
    1. if(Touchscreen.current != null && Touch.activeTouches.Count > 0 && Touch.activeTouches[0].phase == TouchPhase.Began)
    I am on 2020.1.10.

    EDIT: It looks like it works on my iPad, however, it doesn't work on my MacBook in the editor. I have Simulate Touch Input From Mouse or Pen on (in both code and input debugger) so that I can just call touches and the mouse/touch will both work.

    Thanks!
     
    Last edited: Oct 23, 2020
  2. MousePods

    MousePods

    Joined:
    Jul 19, 2012
    Posts:
    754
  3. Rene-Damm

    Rene-Damm

    Unity Technologies

    Joined:
    Sep 15, 2012
    Posts:
    1,779
    SimulatedTouch seems to have a number of issues right now. Looking into them ATM. Made a note to look into the behavior you mentioned as part of this issue.
     
    MousePods likes this.
  4. sterneck_moritz

    sterneck_moritz

    Joined:
    Mar 23, 2020
    Posts:
    8
    Sorry to bump this again but it's been a while.
    Still happening with the Simulated Touch feature (and I'm on Windows). Same happens in the Device Simulator, I guess it's using the same base feature for that?
    Really sad because it makes the Touchscreen in the Editor almost impossible to use, as my whole Touch handling is about the TouchIDs and their TouchPhase. But as OP said, fortunately it works in the build on the actual device!
     
    jeffreylanters likes this.
  5. jeffreylanters

    jeffreylanters

    Joined:
    May 8, 2013
    Posts:
    9
    Is there any process on this issue? I'm running into the same problem in the Unity Device Simulator. All Touch events phases are Stationary except for the last event, right before releasing. I've tried both Unity 2022.2.9 and 2022.2.10 on MacOS in various projects.
     
  6. omanuke

    omanuke

    Joined:
    May 5, 2017
    Posts:
    24
    Similar issue happens in my business partner environment. It works in my environment properly with same source code and same unity ver(2021.3.17f1 Silicon)

    My Mac ver is MOnterey 12.6.2 and business partner's one is Ventura 13.2.1.