Good day,
Using 2021.2b6, UIToolkit, default Unity template.
When building for WebGL, the cursor’s position is detected depending relative to the size of the entire browser window and not just the canvas.
Attached image bellow, the hit detection is offset from the actual hotspot. When browser window is resized to match exactly the canvas, the hitbox is correct. No issues in the editor when resizing game view.
Case# 1357476 with repro project attached.
I am bumping this issue as it’s now becoming a blocker for using UITK with WebGL. Unless the WebGL app is 100% width/height of the browser, the app is unusable.
Hopping to at least get confirmation that it’s a known issue or if I am doing something wrong…
Our QA team hasn’t had a chance to look at the issue yet, but I’ll ask around to see if it’s known.
1 Like
Hey, turns out the issue is already known and being fixed. It affects the new Input system for WebGL, not just UI Toolkit.
Thank you for looking into it. That said, after reading the above issue, it doesn’t (?) appear to be the same? I have no crash or any error on my side. I’ll keep my finger crossed.
Yes the title is misleading but I confirmed this is indeed the root issue.
1 Like