Search Unity

I see my cursor at the screen when I test my game.

Discussion in 'Editor & General Support' started by H_SerhatY, Jan 25, 2020.

  1. H_SerhatY

    H_SerhatY

    Joined:
    Jan 25, 2020
    Posts:
    2
    Hello. I'm new to Unity and the Forum.
    I want to make a FPS game. I have all the required assets, and I'm set my environment.
    But when I test the game, I see my cursor in the screen.
    How I fix it?
    (I'm sorry for bad English.)
     
  2. knobblez

    knobblez

    Joined:
    Nov 26, 2017
    Posts:
    223
  3. H_SerhatY

    H_SerhatY

    Joined:
    Jan 25, 2020
    Posts:
    2
    Last edited: Jan 26, 2020
  4. knobblez

    knobblez

    Joined:
    Nov 26, 2017
    Posts:
    223
    You might of already figured this out, but the name of your script is Cursor. If you just copy pasted that script, then you need to change the class name to match the file name:

    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. public class Cursor : MonoBehaviour
    5. {//-------------^
    6.     // Use this for initialization
    7.     void Start()
    8.     {
    9.         //Set Cursor to not be visible
    10.         Cursor.visible = false;
    11.     }
    12. }