Hide mouse cursor but get mouse moving (up or down)

Hi guy, I’m making 2d shooter. I want the player’s arm rotate when mouse up or down and hide mouse cursor.

I used Screen.showCursor = false but my game does not get mouse transform and when I press left click, mouse cursor is not hide.

How can I do that?

My English is not good, so sorry. Thank you.

This works for me:

using UnityEngine;

public class Activity : MonoBehaviour
{
	void Start()
	{
		Screen.showCursor = false;
	}


	void Update()
	{
		float x = Input.GetAxis("Mouse X");
		float y = Input.GetAxis("Mouse Y");
		Debug.Log(x+", "+y);
	}
}

There is no mouse transform, only movement values. The cursor should not be showing if you’ve hidden it.