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 -- Extended Callbacks Crashing #3

Open
lathertonj opened this issue May 17, 2022 · 1 comment
Open

WebGL -- Extended Callbacks Crashing #3

lathertonj opened this issue May 17, 2022 · 1 comment

Comments

@lathertonj
Copy link
Contributor

The Extended Callback Tests scene is currently crashing on WebGL.

To reproduce:

  • Compile the "Chunity Extended Callback Tests" scene for WebGL
  • Run a simple HTTP server from the build directory, e.g. python -m SimpleHTTPServer 8080
  • Run the scene
  • You may want to comment out most of the tests to isolate one test at a time

To fix:

  • Fix the implementations for related functions in Chunity/Plugins/WebGL/AudioPluginChuck.jslib
  • For example, if FloatID is failing in ChunityTestCallbacks.cs, then the fix will lie in getChuckFloatWithID

The issue is likely with the dynamic callbacks from javascript back to C#, i.e. the dynCall. First place to look would be Emscripten documentation, as well as Unity documentation.
https://docs.unity3d.com/Manual/webgl-interactingwithbrowserscripting.html
https://forum.unity.com/threads/c-jslib-2-way-communication.323629/
https://stackoverflow.com/questions/25576458/calling-a-function-pointer-with-emscripten

@chunthebear
Copy link

Not sure if this is related but when running in editor with build target being WebGL, lines containing DllImport fail due to EntryPointNotFoundException.

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