Any tips how to make it work?
<script> </script> tags, then it should work with the web view component. Although, it would be much more stable if you could host your game elsewhere and embed it via the component.
The idea of @Kirill_Leventcov is good, but if you are still having problems getting your game to work within a
WebView, there may be some issues with how you are integrating the game into the application. Some potential solutions to consider are:
WebView, so you may need to use alternatives.
WebView. Some libraries or frameworks may have issues running in a mobile environment and may require special adjustments to work properly.
If you are having trouble debugging your code, using the browser’s debugging tool may be helpful in seeing what is going on behind the scenes. This will allow you to see any errors and warnings that may be causing problems in the game.
What I did was I deployed a fire base site with the game inside an a-frame. Then I just used the url to the site in a web view, passing the user id as a parameter to the url. Such as ?uid=“(userid), and in the web app it first looks for that param and retrieves player info, so that the player never knows they are even in a web view. That way in the web app you can pass points or whatever.
WebGL, 3d, everything works flawlessly, and if you want to use video ads in game use the frame player library to convert video to json using ffmpeg, and play the audio file separately so that the video (better than video, even video 360, plays inline cuz it’s actually not a video.