Skip to content

WebGL -- Extended Callbacks Crashing #3

@lathertonj

Description

@lathertonj

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions