WebGL -- Extended Callbacks Crashing
Opened this issue · 1 comments
lathertonj commented
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 inChunityTestCallbacks.cs
, then the fix will lie ingetChuckFloatWithID
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 commented
Not sure if this is related but when running in editor with build target being WebGL, lines containing DllImport fail due to EntryPointNotFoundException.