Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebGL app in a web view #1109

Open
MarinaGorbacheva opened this issue Oct 16, 2024 · 1 comment
Open

WebGL app in a web view #1109

MarinaGorbacheva opened this issue Oct 16, 2024 · 1 comment

Comments

@MarinaGorbacheva
Copy link

Hello! Thanks to everyone contributing to this amazing project. I'm trying to run a WebGL app in my Android app using web view (so it's like an app in other app). I placed the whole build of my WebGL project into StreamingAssets path and tried to call LoadHTML("index.html"), but all I get is a white screen. I put the define (UNITYWEBVIEW_ANDROID_USES_CLEARTEXT_TRAFFIC) but it changed nothing. Is it even possible to do what I'm trying to do or am I just using the plugin wrong? I managed to load other page, so the setup is not a problem. I've never worked with web view before so I might be just doing stupid things... could you please give me a clue what am I doing wrong?

@KojiNakamaru
Copy link
Member

If the webgl content can be directly opened by a browser (without a http server), perhaps it can be placed in StreamingAssets and can be loaded after files are copied under Application.temporaryCachePath and so on (see the sample app). If the webgl content requires a http server, it won't be loaded locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants