Topic Author
Posts: 44
Joined: 09 Jan 2018, 15:56

Unity Mouse Cursors

14 Mar 2018, 14:14


I am trying to change the mouse cursor in Unity using this code:
Cursor = Cursors.ScrollAll;

It works fine in Blend, but it does not seem to have any effect in Unity.
Is this supported or is this a defect?

User avatar
Site Admin
Posts: 2262
Joined: 22 Dec 2011, 19:20

Re: Unity Mouse Cursors

14 Mar 2018, 19:10

Each FrameworkElement exposes a Cursor property that can be set to specify one of the available cursors in Cursor enum.

We provide a callback method that will be called everytime a control demands to change the cursor. In the callback you can use Unity API to set the cursor using your cursor textures:
Noesis.GUI.SetUpdateCursorCallback((cursor) =>
  UnityEngine.CursorMode cursorMode = CursorMode.Auto;
  UnityEngine.Vector2 hotSpot =;
  switch (cursor)
    case Noesis.Cursor.Arrow:
      UnityEngine.Cursor.SetCursor(cursorArrowTexture, hotSpot, cursorMode);
    case Noesis.Cursor.Hand:
      UnityEngine.Cursor.SetCursor(cursorHandTexture, hotSpot, cursorMode);
User avatar
Site Admin
Posts: 3151
Joined: 20 Jan 2012, 17:18

Re: Unity Mouse Cursors

14 Mar 2018, 19:19

I don't know if we should offer a better integration for this. Like having a list of textures in NoesisSettings that we automatically use. That way our users don't need to add extra code for this part.

Who is online

Users browsing this forum: leSpadman and 3 guests