How to show the mouse cursor when a canvas is open

So im trying to make a crafting menu, and when i open it the mouse must be visible so i can click buttons with it but it doesn’t work it just flickers.
Here is the code:

    void Update () {
        if (Input.GetKeyDown (KeyCode.Escape)) {
            Pause ();
        }
        if (Input.GetKeyDown (KeyCode.I)) {
            Crafting_menu ();
        }

    }
    public void Pause()
    {
        if (menu_pause.gameObject.activeInHierarchy == false) {
            menu_pause.gameObject.SetActive (true);
            Time.timeScale = 0;
            //Cursor.visible = true;
            Player.GetComponent<FirstPersonController> ().enabled = false;
        } else {
            menu_pause.gameObject.SetActive (false);
            Player.GetComponent<FirstPersonController> ().enabled = true;
            Time.timeScale = 1;
            //Cursor.visible = false;
        }
    }
    public void Crafting_menu()
    {
        if (craft_menu.gameObject.activeInHierarchy == false) {
            craft_menu.gameObject.SetActive (true);
            Cursor.visible = true;
        } else {
            craft_menu.gameObject.SetActive (false);
            Cursor.visible = false;
        }
    }
}

To start, rather than activating the cursor at the moment your paused/crafting state changes, you can do this in LateUpdate() in response to whether these menus are already active. This’ll be a little more reliable and versatile.

void LateUpdate() {
Cursor.visible = (craft_menu.gameObject.activeInHierarchy || menu_pause.gameObject.activeInHierarchy);
}

That said, nothing in your current code jumps out at me as causing flickering cursors. It there anywhere else in the code where Cursor.visible is used, that might be interfering with this?

thanks

yeah i have a problem, the cursor shows up but it stays on the middle and i can’t move it