- Home /
Multiple Cursors - WebGL Unity 5.6
When attempting to change cursor states using the following...
Cursor.SetCursor(cursor, hotspot, CursorMode.ForceSoftware);
Both the custom cursor and system cursors are displayed. I've attempted to use several different combinations of lockstate, Cursor.visible, texture vs cursor types for my images, etc and all have failed.
Has anyone run into this issue and found a fix to hide the system cursor when you use a custom cursor on webgl? Mind you, it looks correct in the editor and I have tested on Chrome, Firefox and Edge
Answer by Deathdefy · May 03, 2017 at 02:30 PM
Looks like the only solution I can find involves having your css style hide the system cursor.
My final solution was hiding the system cursor above and I used Cursor.SetCursor(systemCursor,hotspot,etc)
So I duplicated the system cursor as a texture and show it as a Cursor when I need it instead of setting it to null.
Answer by tMahon · May 01, 2017 at 09:36 PM
When using a build for WebGL you'll run into issues with a custom cursor on the browser end because Chrome doesn't want you to be able to get rid of your system cursor. Your code is probably fine, but Chrome just says no and keeps it there. Try locking the game to full screen after a loading scene in browser, or I've heard building directly to the integrated Facebook Gameroom in 5.6 can help a lot of these issues. Sadly WebGL is loosing integrated support from the major browsers :/
Unfortunately, this is happening on all browsers not just Chrome, also, I'm also not going to be using facebook at all so that wouldn't help either.
Your answer
Follow this Question
Related Questions
Webgl browser error " DirectoryNotFoundException: Could not find a part of the path" 0 Answers
RayCast in WebGL not working 7 Answers
Issue with shaders and WebGL 1 Answer
How do I define the SetCursor Script? 1 Answer
Multiple Cars not working 1 Answer