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

Work with WebGL? #42

Open
Zeon8 opened this issue May 24, 2019 · 1 comment
Open

Work with WebGL? #42

Zeon8 opened this issue May 24, 2019 · 1 comment

Comments

@Zeon8
Copy link

Zeon8 commented May 24, 2019

It work in editor, but when i build WebGL not work
no errors
no warnings
no connecting logs

@PredragSilj98
Copy link

You need to use some workaround. It's no problem with this plugin, but the way unity builds WebGL.

Check this link: https://docs.unity3d.com/Manual/webgl-interactingwithbrowserscripting.html

Basically, when you build your WebGL app, inside that index.html add socketi.io client (you can use from their website). And from c# call function in the browser (make some foo() function) that will init stuff like wich events to call from javascript to c#).

Inside c# just remap functionality to use external DLL import (you don't need socket.io plugin inside unity).

Sadly I don't have an example to show as I did this for the company.

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