diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml deleted file mode 100644 index 30aa626..0000000 --- a/.idea/codeStyles/Project.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml deleted file mode 100644 index f3f4a81..0000000 --- a/.idea/workspace.xml +++ /dev/null @@ -1,695 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - unityView - UnityUtils - getUnityView - inAppBrowserActivity - onMess - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1551719267177 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/android/src/main/java/com/rexraphael/flutterunitywidget/UnityView.java b/android/src/main/java/com/rexraphael/flutterunitywidget/UnityView.java index 1d93c50..0741e89 100644 --- a/android/src/main/java/com/rexraphael/flutterunitywidget/UnityView.java +++ b/android/src/main/java/com/rexraphael/flutterunitywidget/UnityView.java @@ -2,6 +2,8 @@ package com.rexraphael.flutterunitywidget; import android.content.Context; import android.content.res.Configuration; +import android.view.InputDevice; +import android.view.MotionEvent; import android.widget.FrameLayout; import com.unity3d.player.UnityPlayer; @@ -35,6 +37,13 @@ public class UnityView extends FrameLayout { } } + @Override + public boolean dispatchTouchEvent(MotionEvent ev) { + ev.setSource(InputDevice.SOURCE_TOUCHSCREEN); + view.injectEvent(ev); + return super.dispatchTouchEvent(ev); + } + @Override protected void onDetachedFromWindow() { // todo: fix more than one unity view, don't add to background.