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

UI not showing in WebGL build

Discussion in 'WebGL' started by Zucchinipi, Oct 14, 2019.

  1. Zucchinipi

    Zucchinipi

    Joined:
    Jan 12, 2017
    Posts:
    9
    When I build and run my project with WebGL, none of the UI elements show up (added one in-world cube to my project to test, and it does show up, though). When running in-browser, the console is full of "Trying to bind too many vertex attributes (got 30 max is 15)," which I suspect is related. There are no issues when I build for Mac. I'm using Unity 2019.2.9f1 on MacOSX Catalina.

    What might be causing this? Any workarounds?
     
  2. Zucchinipi

    Zucchinipi

    Joined:
    Jan 12, 2017
    Posts:
    9
    Tried running more in different browsers:

    Safari: Elements show up, but in default pink color. Error: "WebGL: INVALID_OPERATION: textImage2D: type HALF_FLOAT_OES but ArrayBufferView is not NULL"

    Firefox and Chrome: UI elements do not show up at all. Error: "GL.End requires material.SetPass before! (Filename: ./Runtime/GfxDevice/DrawImmediate.cpp Line: 172)"
     
  3. jukka_j

    jukka_j

    Unity Technologies

    Joined:
    May 4, 2018
    Posts:
    944
    Got word from Apple WebKit dev team that the HALF_FLOAT_OES issue in Safari just got a patch (at https://bugs.webkit.org/show_bug.cgi?id=169999 ) so hopefully they will release a browser version with the fix very soon.

    It is possible that in your browser's WebGL implementation the max limit for vertex attribute count is smaller than for the native GPU driver. (Only 15 instead of >=30) You can check the limit at https://www.geeks3d.com/webgl/ . For my Chrome browser the page lists MAX_VERTEX_ATTRIBS: 16
     
    Jelmer123 likes this.