Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Multidisplays with multitouch

Discussion in 'Windows' started by AoZou_, Aug 20, 2021.

  1. AoZou_

    AoZou_

    Joined:
    Aug 18, 2021
    Posts:
    1
    Platform Windows10 , unity version 2020.2.1f1c1

    The main screen is controlled by the touch screen of windows

    The sub screen obtains radar signals through external radar + tuio, realizing the interaction between the sub screen and people

    I've distinguished the types of signals and both the touch operation of the main screen (click, drag, etc.) and the step operation of the sub screen (click, follow, etc.) can operate correctly, but now there is a problem. When touching the main screen, the sub screen will flash with unknown reasons (sometimes game will be crashed)

    Code (CSharp):
    1. //Enter
    2.         void pointersPressedHandler(object sender, PointerEventArgs e)
    3.         {
    4.             if (IsActive)
    5.             {
    6.                 foreach (var pointer in e.Pointers)
    7.                 {
    8.                     //MouseType
    9.                     if (Mouse_input == false)
    10.                     {
    11.                         if (pointer.Type.Equals(Pointer.PointerType.Mouse))
    12.                         {
    13.                             return;
    14.                         }
    15.                     }
    16.  
    17.                     if (pointer.InputSource.ToString().Contains("TouchHandler"))
    18.                     {
    19.                         Debug.LogError("TouchPoint");
    20.                         return;
    21.                     }
    22.  
    23.                     Debug.LogError("RadarPoint");
    24.  
    25.                     foreach (var obj in TUIOGameobject)
    26.                     {
    27.                         obj.GetComponent<TUIOComponent>().OnUpdatePointer(pointer);
    28.                     }
    29.                     _IconObj.GetComponent<TUIOComponent>().OnUpdatePointer(pointer);
    30.                 }
    31.             }
    32.         }
    Through tests in different environments, i found that Windows7 can run correctly, but windows10 cant

    Heres the test video

    I've almost ruled out problems of the hardware.
    May be there is any difference of multi-touch between win7 and win10, or maybe it is caused by the unity version

    At present, it is preliminarily speculated that it is the reason for multi screen and multi touch, but it is difficult to make further progress I want to know why and how to solve it,Thank You! Please let me know if you need more information
     

    Attached Files: