Search Unity

How to set cursor in Standalone player?

Discussion in 'Windows' started by User340, Jun 17, 2020.

  1. User340

    User340

    Joined:
    Feb 28, 2007
    Posts:
    3,001
    I would like to set the cursor to use the built-in cursors (text cursor, resize left/right, etc...) in the Windows Standalone player. I am aware of the Cursor API in Unity, but I don't see a way to apply the OS cursors with it. Is there an easy way to accomplish what I'm asking?
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    You could always P/Invoke into LoadCursor/SetCursor winapi functions.
     
  3. User340

    User340

    Joined:
    Feb 28, 2007
    Posts:
    3,001
    How is that done exactly? Can it all be done in Unity C# or do I have to write a Plugin?