Hello,
I have a custom Android plugin to play video over unity. It’s all working great.
However, I need to block unity’s input because there’s a scene running behind the video.
I’ve tried overriding the onTouchEvent on my Activity to no avail.
My Activity is extending UnityPlayerActivity
@Override
public boolean onTouchEvent(MotionEvent event) {
// return true should consume event
return true;
}
Also, I tried adding a custom view on up of my video player with fill_parent and used onTouchEvent.
Unity is always getting inputs. Is this possible?
Thanks,
Hugo
EDIT #1 : I’ve tried setting onTouchListeners everywhere and it’s still not working. I’m not able to stop the propagation.
unityPlayer is found searching for if (view instanceof UnityPlayer)
unityPlayer.setOnTouchListener(new OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
// return true should consume the event...
return true;
}
});