Locking the cursor in the middle of the screen but visible

I’m working on a small Unity 2020.1/C# app that lets you walk and look around a room but also click on specific objects to get more information about them. For the “looking around” part I lock the cursor with:

Cursor.lockState = CursorLockMode.Locked;

This also automatically hides the cursor and Cursor.visible = true doesn’t affect it (documentation).

I’m still able to click on objects like that but it’s not that easy, especially with small objects, when you can’t see the cursor.

How do I set it to be visible, while still being locked in the middle of the screen?

Why not just use your own crosshair or point? Just enable a screen overlay canvas that has a dot or something in the middle in those cases.

1 Like

I was actually going to do that if it’s absolutely not possible to display the cursor while it’s locked but I’m still wondering if there’s a way to do it.