Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Bug Changes in Unity 2021.2 beta (13)? Pointer_stringify

Discussion in 'WebGL' started by De-Panther, Sep 26, 2021.

  1. De-Panther

    De-Panther

    Joined:
    Dec 27, 2009
    Posts:
    552
    1) It seems that "Pointer_stringify" is now undefined, and instead we should use "UTF8ToString",
    but the manual for 2021.2 still talks about "Pointer_stringify".
    https://docs.unity3d.com/2021.2/Documentation/Manual/webgl-interactingwithbrowserscripting.html

    I do think that for backwards compatibility, it'll be nice to still have this method, as lots of plugins are using it.

    2) While I was writing this post, Marks already posted about https://forum.unity.com/threads/jspre-files-being-ignored-webgl.1174493/
     
    tonialatalo likes this.
  2. Marks4

    Marks4

    Joined:
    Feb 25, 2018
    Posts:
    491
  3. kou-yeung

    kou-yeung

    Joined:
    Sep 5, 2016
    Posts:
    30
    this issues is dependence with emscripten.
    Other breaking change from emscripten v1.37.27 to remove the `Runtime` object..

    FYR:
    emscripten : release_notes
    https://emscripten.org/docs/introducing_emscripten/release_notes.html

    to check the emscripten version of unity playback engine
    {UnityEditorPath}\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten\emscripten-version.txt

    ---
    for my project.
    i added a function to support backwards compatibility.

    https://github.com/kou-yeung/WebGLI...s/WebGLSupport/WebGLInput/WebGLInput.jslib#L3
    and call this function at static constructor
    https://github.com/kou-yeung/WebGLI...ts/WebGLSupport/WebGLInput/WebGLInput.cs#L121
     
    tonialatalo likes this.
  4. De-Panther

    De-Panther

    Joined:
    Dec 27, 2009
    Posts:
    552
    Yes, I know that it's emscripten related, but Unity can add a "Pointer_stringify" wrapper function for "UTF8ToString", so you and other tools creator won't have to create patches or updates.
    And I also know how to check the playback engine version :) https://medium.com/@depanther/unity-webgl-secrets-b6ddf214f1fd

    Also dyncall_sig should still work, I saw that @jukka_j made sure that emscripten would keep supporting it for backwards compatibility, this is why I think that "Pointer_stringify" should be the same.
     
    tonialatalo and kou-yeung like this.
  5. Marks4

    Marks4

    Joined:
    Feb 25, 2018
    Posts:
    491
    Any Unity dev around? Please, I'd like to know if you guys are aware of this bug. I tried to report the bug twice, but I can't because the bug report window freezes. This bug is critical for webgl, most(if not all) of my assets use .jspre files and if this bug doesn't get fixed before release all of my plugins will suddenly break!

    @jukka_j my man are you still dead? We need you!
     
    tonialatalo likes this.