Search Unity

Bug Android Button Click events seem to notify other buttons

Discussion in 'UI Toolkit' started by CabinIcarus, Feb 27, 2021.

  1. CabinIcarus

    CabinIcarus

    Joined:
    May 24, 2017
    Posts:
    72
    I tested on a real device and found that when I open the media list interface, the playback interface is also opened most of the time. It is normal when in the editor

    Unity Ver: 2021.1.0b3
    UIToolkit Ver: 1.0.0-preview.14

    upload_2021-2-27_18-40-32.png

    upload_2021-2-27_18-43-46.png
     
    Last edited: Feb 27, 2021
  2. CabinIcarus

    CabinIcarus

    Joined:
    May 24, 2017
    Posts:
    72
    My temporary solution,Annotate the SendInputEvents method call in `DefaultEventSystem.Update`
    upload_2021-3-3_1-8-9.png
     
  3. Midiphony-panda

    Midiphony-panda

    Joined:
    Feb 10, 2020
    Posts:
    243
    CabinIcarus likes this.
  4. CabinIcarus

    CabinIcarus

    Joined:
    May 24, 2017
    Posts:
    72
  5. CabinIcarus

    CabinIcarus

    Joined:
    May 24, 2017
    Posts:
    72
    Midiphony-panda likes this.
  6. Midiphony-panda

    Midiphony-panda

    Joined:
    Feb 10, 2020
    Posts:
    243
    CabinIcarus likes this.
  7. CabinIcarus

    CabinIcarus

    Joined:
    May 24, 2017
    Posts:
    72
    ok
     
  8. uBenoitA

    uBenoitA

    Unity Technologies

    Joined:
    Apr 15, 2020
    Posts:
    220
    Sorry for that, guys, we know about that issue and how to fix it, and we do have the fixed code lying around, have had it for quite some time now, but it's unfortunately not released in any preview of the package yet. The reasons for that are... complicated, but let's just say, we have it under control, it's going to come in a future update of the package, and sorry again for the super long delay :-/

    If you have the package source checked out locally, you can definitely edit it, the fix posted here is good and does the job perfectly. Thanks for opening the issue and reminding us that there are many people waiting for that fix, it generally helps for prioritizing the bits that go in in future updates and the bits that don't.
     
    CabinIcarus and Midiphony like this.
  9. CabinIcarus

    CabinIcarus

    Joined:
    May 24, 2017
    Posts:
    72
    I found today that using your way although the button is not triggered in error, but ContainsPoint method can not be accurately judged, so I am still commented SendInputEvents call, if you use the ContainsPoint method, then you need to pay attention to

    upload_2021-3-5_3-38-36.png

    He will always return false, resulting in the closure of
     
  10. CabinIcarus

    CabinIcarus

    Joined:
    May 24, 2017
    Posts:
    72
    Looking forward to the next version update!