- Home /
Custom Cursor hidden behind my UI
As the title suggests, I have made a custom cursor by making a new gameobject into worldspace and make it follow the mouse cursor. It contains transform, a script and sprite renderer. That worked perfectly fine, the problem is, I have set up a few UI for my game and everytime I open them up, my cursor goes behind the UI. I get that this is because it is a gameobject and it will always go behind the canvas no matter the layer. Is there a way to fix this? I also want my cursor to be interactable with the UI.
Thanks.
Answer by ZozeR · Aug 25, 2020 at 10:05 AM
You can change canvas settings like so; https://answers.unity.com/questions/1521152/how-do-you-place-a-gameobject-in-front-of-a-ui.html or instead of creating a game object that follows the cursor, you can just set the cursor to that image, if there isn't anything else. https://www.youtube.com/watch?v=cCKlMAwvQcI
Answer by DkSker · Aug 26, 2020 at 04:44 AM
Changing the cursor to the image wouldn't work. However is there a video on how to go by the first solution. I am kind of new to unity so I don't know how to go about doing "2nd you can make your canvas to screen space in canvas, and put an object child in front of it." this. Thanks.
Your answer
![](https://koobas.hobune.stream/wayback/20220613010451im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
post processing stack with particle system. 1 Answer
Is it possible to make an online multiplayer 2D game in unity using only the unity UI components 1 Answer
Is making a 2d tile based game all in UI a bad solution or is it viable? 1 Answer
Unity 5.2 Canvas component makes the position not to update 2 Answers