Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to click on other unity buttons after holding down the screen with your hand #850

Open
iguangyu opened this issue Jul 27, 2023 · 8 comments
Labels
Flutter issue/bug Problem caused by Flutte that we can't fix

Comments

@iguangyu
Copy link

Describe the bug
I have encountered a situation in Unity where two fingers simultaneously touch a button and release one finger. Clicking on the screen again with the released finger will not have any response
I am very confused about this. May I ask if any major figures have encountered this problem and if there is a solution
I seem to have to compile the engine, but I don't know anything about it

my flutter code
image

Screenshots
image

Smartphone :

  • Device: iPhone 13mini
  • OS: ios15.4
@timbotimbo timbotimbo added the Flutter issue/bug Problem caused by Flutte that we can't fix label Jul 27, 2023
@timbotimbo
Copy link
Collaborator

timbotimbo commented Jul 27, 2023

This is a Flutter bug with multitouch gestures, the exact behavior that you mention happens for any PlatformView in Flutter, not just Unity.
See flutter/flutter#98188 and flutter/flutter#96640 where this was reported in the Flutter repo.
Sadly it was reported about 1.5 years ago and there doesn't seem to be anyone looking into it.

This should probably be added to the Readme as a known limitation.

Related issues: #556 #505

@iguangyu
Copy link
Author

iguangyu commented Jul 28, 2023

This is a Flutter bug with multitouch gestures, the exact behavior that you mention happens for any PlatformView in Flutter, not just Unity. See flutter/flutter#98188 and flutter/flutter#96640 where this was reported in the Flutter repo. Sadly it was reported about 1.5 years ago and there doesn't seem to be anyone looking into it.

This should probably be added to the Readme as a known limitation.

Related issues: #556 #505

Thank you very much for your analysis 🙏, Do you know the gestureRecognizers parameter in UnityWidget? It seems to be able to send gesture events to iOS's native uikitView

image

@iguangyu
Copy link
Author

Then I tried and found that it still didn't work. I don't know if it's a problem with my own code, but it's reasonable to say that sending gesture events to iOS's native uikitView is a solution to this problem

@AdrienGannerie
Copy link

AdrienGannerie commented Jul 31, 2023

So the only way to get multi touch working in Unity is to remake all the inputs layer from Flutter ? How do you use gestureRecognizers from the widget ? Did you find a solution @iguangyu ?

@iguangyu
Copy link
Author

iguangyu commented Aug 13, 2023

So the only way to get multi touch working in Unity is to remake all the inputs layer from Flutter ? How do you use gestureRecognizers from the widget ? Did you find a solution @iguangyu ?

In the unitywidget component, the native UIKitView is already used. To solve the problem of multi touch, it is still necessary to change the flutter engine @AdrienGannerie

But I found an article that seems to have solved this problem using the change engine
here -> https://zhuanlan.zhihu.com/p/429345027

@AdrienGannerie
Copy link

Thanks for your answer @iguangyu. I already saw this article but I don't understand anything when I try to translate it. Did you succeed to change the engine using this article ?

@iguangyu
Copy link
Author

iguangyu commented Aug 15, 2023

Thanks for your answer @iguangyu. I already saw this article but I don't understand anything when I try to translate it. Did you succeed to change the engine using this article ?

The content of this article is not comprehensive, only a solution is provided. I am trying to solve it with this solution, but there is currently no progress @AdrienGannerie
And we can synchronize and regularly communicate progress

@guilmetj
Copy link

Did you manage to find any solution ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Flutter issue/bug Problem caused by Flutte that we can't fix
Projects
None yet
Development

No branches or pull requests

4 participants