Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Help Please!

A topic by AdamSeslar created Feb 21, 2020 Views: 134 Replies: 3
Viewing posts 1 to 4

I was wondering if anyone has ever worked with custom cursors on a webgl build? I'm having a issue where my custom cursor wont work in a webgl and it instead displays your normal cursor, however in unity and in a windows build the cursor works perfectly, does anyone know a work around or a way to get it working. Its a big part of my game unfortunately and i cant really do without it:(

Submitted

I how unity handles custom curses relies on the fact that you have the application running on the actual computer as a standalone rather than in an embed in a web page. I don't think custom cursors are supported in webGL. That being said you can get around this by just creating a gameobject sprite within your game as a UI element and just tell it to constantly transform.tranlsate to your mouses position (which you can access through Input.GetMousePos or something)

Submitted

Well I played blackthordprod's second to last game on itch yesterday, its on webgl and there was a custom cursor so its definitely possible. I didnt really look into it maybe he explains how he did it on his channel good luck

Thanks Aubry and graves, after looking into it i believe that btp does the same thing graves is describing, i was considering something like that but i was afraid the mouse would still be visible but i suppose its better then it just being the standard mouse haha thank you both for the advice! Good luck with your own games cant wait to play:)