Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

How to set cursor in Standalone player?

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

  1. HonorableDaniel

    HonorableDaniel

    Joined:
    Feb 28, 2007
    Posts:
    2,970
    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:
    7,677
    You could always P/Invoke into LoadCursor/SetCursor winapi functions.
     
  3. HonorableDaniel

    HonorableDaniel

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