- Home /
SetCursor WebGL doesn't work
Hi, Im trying to change texture2D on Mouse Cursor, after click on UI Button. It's working in my Unity Editor, and when i build my project on standalone works too, but when i build my project on WebGL, setCursor doesn't work. Somebody help pls? Unity 5.1.0f2
Thanks Tomas
I too have this problem, as of Unity 5.2.0f3. I'm setting the cursor to a 32x32 sprite in a prototype I am working on.
You can see the issue occurring in this webplayer; by default the cursor should be a gauntleted hand. When a friendly unit is selected, mousing over a friendly unit should change the cursor to an arrow that means "move to this unit." When mousing over a hostile unit, it should change to a sword. When positioned over the unit, it should be an arrow with a shield, meaning "defend position." When an enemy unit is selected, the cursor should not change.
Ins$$anonymous$$d what you see, is random gibberish.
Im on Unity 5.3.4f1 and use Cursor$$anonymous$$ode.ForceSoftware but I get a double cursor on firefox and chrome.
Any solutions for this?
Answer by Stefanie-Nobel · Mar 02, 2016 at 06:40 AM
Still the same problem with Unity 5.3.2, but set CursorMode to CursorMode.ForceSoftware. That helps!
Stefanie see my question with the texture. Im on 5.3.4 Get double cursor with ForceSoftware
I can not find out, what was different before, when I had just a single cursor but now I've got double cursor as well.
$$anonymous$$y workaround is to set the cursor to none in the css file:
'#unity_container { ... cursor: none; }
and define my own default cursor when entering the unity container (in unity player settings). It is not the solution, I know, but I could not find out why we are getting the double cursor for now.
Ok, let me know if you find anything!
Still having the same issue, do you have any update on this? Im asking on another forum also, I let you know if I find a solution.