gree / unity-webview

zlib License
2.3k stars 695 forks source link

iOS Unity UI not responsive #1002

Open piggypandadev opened 1 year ago

piggypandadev commented 1 year ago

Hello,

I tried this plugin : https://github.com/gree/unity-webview/tree/experimental/unity-over-native-ui

Since it had the recent push. It works perfectly fine on Android for the purpose I am trying to use i.e. Play YouTube video without any interactions and render Unity UI over it. But on iOS I cant achieve the same.

I have different buttons for different YouTube videos, I am trying to load them after clicking on it into different scene. which works perfectly on Android but on iOS those first scene buttons are non-responsive at all. Kindly guide me! have been searching through the issues but couldn't find my issue. Thank you.

KojiNakamaru commented 1 year ago

You need to guard events from being passed to webviews, by utilizing ClearMasks/AddMask. If you don't want to pass any event to webviews, the following should work.

    WebViewObject.ClearMasks();
    WebViewObject.AddMask(0, 0, Screen.width, Screen.height);