Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Bug Emscripten runtime error in WebGPU build

Discussion in 'Unity 6 Beta' started by OMGTOASTER, Mar 2, 2024.



    Nov 3, 2014
    When trying to play a webgpu build in browser, this error shows in the console:

    Uncaught TypeError: Failed to execute 'setIndexBuffer' on 'GPURenderPassEncoder': Value is outside the 'unsigned long long' value range.
    at _wgpu_render_commands_mixin_set_index_buffer

    After a bit of investigation and if I'm not mistaken, it seems to be a bug on emscripten's side that has been reported and subsequently fixed as shown here:
    And merged here:

    However, as this was August 31, 2023, it is probably not included in the older 3.1.38 version that Unity is currently bundling. Is there a planned update to the emscripten compiler sometime soon? Otherwise, what could be the cause and how can I avoid it?

    DrViJ likes this.