Unity Community


Results 1 to 6 of 6

  1. Location
    Cmune HQ
    Posts
    719

    Unity Web player issue - mouse hidden for all new windows

    I've come across a strange problem when viewing Unity Web players in Safari.
    When i open a new window over an active Unity Web player window, the mouse is hidden in that same region for the new window.
    The problem goes away when Safari is not in focus.

    Anyone else had this problem? - its a bit annoying when you're trying to browse other pages and cant find your mouse

    Cheers
    Shaun


  2. Location
    Van Nuys, CA, USA
    Posts
    97
    I've just encountered the same issue in the regular Unity player.

    It seems that if the unity player is (or is in) the active application and you have Screen.showCursor set to false, Unity will keep the cursor hidden even if the player is no longer the front window.

    There are several ways to reproduce this effect:

    If you use a custom cursor that tracks the position of the mouse but doesn't show the system cursor, you can open your (non-web) player in windowed mode hit the minimize button, but keep the app active. You'll find that in the screen region where you player was before minimizing the mouse will disappear.

    Again, with a custom cursor -- if you open the about box and it opens (or is placed) on top of the unity player, you will not see the system cursor when mousing over the about box...

    All this brings me to my question . . . is there a way to determine if the player is in fact the front/top-most window, and if not, be able to then parse that fact and change the cursor setting accordingly?

    -rob
    Developer, Benchtop Creative
    http://benchtopcreative.com

  3. Unity Product Evangelist
    Location
    San Francisco CA USA
    Posts
    6,186

    Re: Unity Web player issue - mouse hidden for all new window

    Quote Originally Posted by shaun
    Anyone else had this problem? - its a bit annoying when you're trying to browse other pages and cant find your mouse
    Known and logged bug, sorry about that. I'll add some fresh notes to the bug record in the hopes of bumping up the priority a notch or three.

    Perhaps you can use some browser JavaScript to detect when your current window is no longer active (use the window object's onblur event) and send a message to the Unity content to reveal the mouse. Of course you'd then need to again detect when focus is regained by the window to hide the cursor once more. Sorry about the workaround needs but hopefully it gets you guys working while waiting for us to implement a proper fix.
    Tom Higgins - Product Evangelist at Unity Technologies ApS
    unity3d.com | answers | blogs | feedback

  4. Unity Product Evangelist
    Location
    San Francisco CA USA
    Posts
    6,186
    Quote Originally Posted by BasketQase
    All this brings me to my question . . . is there a way to determine if the player is in fact the front/top-most window, and if not, be able to then parse that fact and change the cursor setting accordingly?
    I mentioned a web player workaround above but that's obviously not going to work in a stand-alone case. Honestly I'm just not sure if there are any solutions or workarounds in that case, I'll see if I can find any for you (stay tuned).


    Edit: and after inquiring internally there doesn't appear to be a way to do this detection in the stand-alone player. The bug is now on the high-priority list for a 2.x dot-release update.
    Tom Higgins - Product Evangelist at Unity Technologies ApS
    unity3d.com | answers | blogs | feedback


  5. Posts
    2
    Hi, I'm encountering the same issue with the latest Unity web player (3.x). Just curious if this issue has been resolved or if there's a way around it. I've tried to implement a window.blur detection method via Javascript and send the status to Unity to grab/release mouse cursor depending on window status. But it's still buggy in IE7 and IE8 (and apparently also some issues in Chrome).

    Please advise.


  6. Posts
    2

    More details....

    I've posted more technical details on StackOverflow just in case someone over there may have similar experience as well:
    http://stackoverflow.com/questions/5...cursor-ie-woes

    Please help vote it up to help gain more visibility if you feel the issue is legitimate and would also like to see it resolved with an elegant solution. Or if any of you was able to successfully work around or resolve the issue, please do share.


    Solution found:
    http://forum.unity3d.com/threads/275...l=1#post184304

    And I also closed my own question on StackOverflow:
    http://stackoverflow.com/questions/5...592373#5592373
    Last edited by scchu; 04-08-2011 at 01:31 AM. Reason: Solution to this thread found.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •