Forum rules - please read before posting.

Trying to hide the PC System cursor in WebGL releases

Hello Adventure Creator forum, I'm trying to hide the Windows cursor in the WebGL releases with no success, even I tried replacing the Windows cursor in Player Settings but it still there.

I know that I can change to Hardware cursor but I like to have animated cursors and the Unity UI cursor doesn't work either.

If anyone out there want to help me, I will be eternally grateful.


  • edited August 2021

    Welcome to the community, @Kit.

    The AC code used to control/hide the cursor is the same for WebGL as it is other platforms - I suspect that WebGL has its own restrictions regarding what can be done with the cursor, for security/accessability reasons.

    If you need an animated cursor in WebGL, using the Unity UI cursor would be my recommendation. If you're having issues getting it up and running, please share details/screens of the setup, and I'll do my best to advise further.

  • @ChrisIceBox I don't know exactly how to set the Unity UI cursor 😅

    I tried following the instructions but I didn't understand at all 😓

  • The wiki script can be used in two ways, one more complicated than the other.

    To get started, just focus on the first method for now - the one that involves assigning RawImage component, without anything related to animation.

    Enable Hardware cursor rendering, create a Unity UI canvas, and attach a RawImage component as a child. Attach the script and assign the RawImage component in its Inspector, as well as the others except the Animator and Parameter fields. Finally, attach a Canvas Group component to the Canvas root, and uncheck "Interactable".

    See how far you get, and share screenshots showing what you have. It doesn't matter how far along you get, but I will need to see your setup - otherwise, I can only repeat the instructions.

  • @ChrisIceBox I'm on it, but the Unity UI animated cursor changes when cursor is on a Hotspot?

  • but the Unity UI animated cursor changes when cursor is on a Hotspot?

    The cursor should change to the "Hotspot cursor", if you've set it to in your Cursor Manager. Can you rephrase your question, with images showing how it behaves in-game vs how you want it to behave, as well as any related settings e.g. your Settings and Cursor Manager?

    Is the RawImage moving with the cursor position, at least?

    The Inspectors in the screenshot look correctly set up, but I lack context if they're cropped as I can't see where they're listed in the Hierarchy. Please share as much as you can - full-screen, so that I can see more clearly the scenario.

    You've defined parameters in the parameter fields, but no Animator. The parameter fields will only be used with the presence of an Animator, but adding animation is another level of complexity, and isn't necessary to recreate the behaviour of the regular Software cursor. For the moment, let's just focus on getting the cursor to behave as it did before.

  • Hi again, I'm here to tell you, I found the way to hide the Windows cursor on WebGL releases by changing a small thing in a JavaScript file

  • It's as simple as doing this, in your project folder, find the framework Javascript file, search the word "cursor", search until you reach this line: {"default:"none"}

    Just change "default" to "none" and problem solved!

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.