Search Unity

  1. Are you interested in providing feedback directly to Unity teams? Sign up to become a member of Unity Pulse, our new product feedback and research community.
    Dismiss Notice

Problem with Cursor.SetCursor

Discussion in '5.5 Beta' started by EParent, Sep 1, 2016.

  1. EParent

    EParent

    Joined:
    Feb 13, 2015
    Posts:
    36
    Hi,
    I have a problem. I have a script who change my cursor when i'm over a button. I used this script for the oldest version, but in Unity 5.5.0b1, Unity give me this error :

    `Cursor' does not contain a definition for `SetCursor'

    Here's my code

    public Texture2D cursorTexture;
    public CursorMode cursorMode = CursorMode.Auto;
    public Vector2 hotSpot = Vector2.zero;

    Cursor.SetCursor(cursorTexture, hotSpot, cursorMode);

    Someone can help me ?
     
  2. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    2,708
    Hi EParent,
    Please check if you've included "using UnityEngine;" in your script.
     
unityunity