Making Cursor Mouse Always Enabled In Unity CardBo

2019-09-20 13:52发布

问题:

i think the title is clear , i want to make the mouse Cursor which is set in GazeInpuModule to be always enabled and in center of the both Left And Right Cameras , can anyone help me ?!

  • ive tried changing the GazeInputModule code to place the cursor in center , but got nothing !

回答1:

Here's what worked for me:

  1. Create a Cursor GameObject in the Head hierarchy

  2. Add EventSystem in the project hierarchy

  3. In the EventSystem Gaze Input Module component, ensure "Show Cursor" is selected.

  4. In GazeInputModule.cs, PlaceCursor(), change the SetActive() to:

    private void PlaceCursor() {
        // ...
        cursor.SetActive(showCursor); 
        // ...
    }