Search Unity

Metro App and Screen.showCursor - buggy?

Discussion in 'Scripting' started by Axel-F, Jun 16, 2014.

  1. Axel-F

    Axel-F

    Joined:
    Mar 20, 2009
    Posts:
    224
    Hi,

    as the following behaviour only happens when building a Metro app with Visual Studio and not in Unity itself I guess it is some-kind of a bug. Well, here is what I'm doing:

    I my game I'm displaying a custom cursor using a Texture2D and disabled the System cursor via Screen.showCursor = false.
    But at some point I need the system cursor again and use Screen.showCursor = true to display it.
    That works without problems in the Editor. But when running my Metro app the cursor position (after doing showCursor = true) is the one that was the cursor's position when doing showCursor = false before. As a result the mouse jumps to whatever position the last mouse position was when hiding the system cursor. So no seamless transition of "system cursor" and "custom cursor" when switching these cursors is possible.
    The setup of Screen.lockCursor to false or true makes no difference.

    The main reason I'm wanting to do this is because the standard "close app menu" on top of my Metro app is not appearing when using a custom mouse cursor and/or hiding the system cursor. Maybe that's another bug?

    I need a solution for one of these problems...

    Thanks in advance for ideas!

    Regards, Axel
     
  2. tiz777

    tiz777

    Joined:
    Jan 20, 2010
    Posts:
    93
    Hi Axel,

    I'm encountering exactly the same problem here.

    This seems a bug.. Have you found a solution in the mean time?