Receiving a message from browser.
srcnalt opened this issue · comments
Hi,
I was wondering if it's possible to receive a message from web content to Unity project with the plugin.
Seems like this is kind of related to this question here #13
Hi, what I mean is sending a message to Unity, from the browser.
I am using unity-webview repo for displaying a browser window in Android and IOS apps, however it does not support VR. I was looking for alternatives and came up with this project which works perfect!
In unity-webview
the user can add a line of code into their webpage, such as Unity.call("message")
and this message is captured by the plugin and served to user. I was wondering if something similar would be possible here.
I suppose this is done by somehow parsing the javascript in the page and injecting a functionality to a certain Unity
object in there.
Ohhh right right, this is complicated. What you want to do is interact with GeckoView/one of its components from javascript. That should give you the right search queries. This may be of use.
reference: mozilla/geckoview#85
Thank you, I'll give it a read.
Looks like #41 used WebExtension for this