# Problem with Cursor.SetCursor

**URL:** <https://discussions.unity.com/t/problem-with-cursor-setcursor/638533>\
**Category:** Scripting\
**Tags:** 5.5-beta\
**Created:** [September 1, 2016, 4:18pm UTC](https://discussions.unity.com/t/problem-with-cursor-setcursor/638533 "2016-09-01T16:18:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![EParent](https://avatars.discourse-cdn.com/v4/letter/e/c2a13f/32.png) [@EParent](https://discussions.unity.com/u/EParent)\
**Post date:** [September 1, 2016, 4:18pm UTC](https://discussions.unity.com/t/problem-with-cursor-setcursor/638533/1 "2016-09-01T16:18:56Z")

</div>

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 ?

---

<div class="post-metadata">

**Author:** ![LeonhardP](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/leonhardp/32/32_2.png) [@LeonhardP](https://discussions.unity.com/u/LeonhardP)\
**Post date:** [September 2, 2016, 12:31pm UTC](https://discussions.unity.com/t/problem-with-cursor-setcursor/638533/2 "2016-09-02T12:31:00Z")

</div>

Hi EParent,  
Please check if you’ve included “using UnityEngine;” in your script.
