Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question ui is off screen when build to webgl

Discussion in 'Web' started by mellowVtuber, Feb 16, 2021.

  1. mellowVtuber

    mellowVtuber

    Joined:
    Feb 15, 2021
    Posts:
    27
    my build works if i build for pc, but when i build for webgl, with same resolution, my ui doesnt show up on the screen at all. i even have a non ui sprite in front of the camera, and it doesnt show up either.

    i cant reproduce the problem in the editor at all. no matter what crazy resolutions i set, it only happens with webgl.

    i think the ui is just not being visible, because i would click around on the screen and it would trigger a button, which loaded the next scene, and then the ui was visible.


    edit - i tested more and ui is definitley there, just not visible. i can click the invisible buttons to go to my next scene, which works. and going back to main menu again gives same problem.
     
    Last edited: Feb 16, 2021
  2. jukka_j

    jukka_j

    Unity Technologies

    Joined:
    May 4, 2018
    Posts:
    953
    Which Unity version are you using? Do you have high DPI/Retina display? (If so, can you see if lowering to standard DPI affects the issue?) Are there any diagnostics messages in the web browser console?

    If none of that helps diagnose the problem and you are on latest Unity version, please open a bug report and our QA can give it a peek.