Cursor disappears when set to locked cursor mode

When I set the CursorLockMode to Locked and run the game the cursor disappears without telling it to set visible to false. But when I unfocus (by hitting escape) from the game window the cursor reappears.

Code:

void Start()
{
    Cursor.lockState = CursorLockMode.Locked;
}

and even if I tell it to show the cursor by:

Cursor.visible = true;

nothing happens. My main goal is to make a custom cursor by:

Cursor.SetCursor(*texture for the cursor*, new Vector2(6, 6), CursorMode.Auto);

and i still have the same problem, but if i set the CursorMode to ForceSoftware, it does show, but it’s really jiggly.
Basically the main problem is that when I set CursorLockMode.Locked, the cursor disappears.

Hi try using this

void update()
{
Cursor.lockState = CursorLockMode.Locked;
Cursor.visible = true;
}

Instead of using your mouse as a sight or the clicker, insert an image where the mouse was originally so that way it will remain static. If you chose to do it this way just set Cursor.visible to false. Hope this helps.

Here is a link to some API