Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Mac OS X El Capitan's "find mouse cursor" feature

Discussion in 'Scripting' started by invicticide, May 24, 2016.

  1. invicticide

    invicticide

    Joined:
    Nov 15, 2009
    Posts:
    109
    I got this bug report from a beta tester:

    On newer versions of Mac OS X, when the user waves the mouse around in circles, it causes the cursor to magnify to a larger size, helping users locate the mouse cursor if they've lost it somewhere on the screen. (Apparently this feature is new to El Capitan specifically.)

    I can get this to happen inside the game, but only while in a menu, not in while in actual gameplay. The mouse cursor is invisible as it should be, replaced by the crosshair, until I "shake" the mouse, and the crosshair disappears to be replaced by the enlarged mouse cursor.

    I'm not on El Capitan myself (I'm still on Yosemite) so I haven't seen this firsthand, but it seems straightforward enough. Here's a screenshot of my game shell with the cursor comped in (Application.CaptureScreenshot doesn't render the hardware cursor itself):



    See the crosshair hovering over the "windowed" checkbox? That's my hardware cursor; specifically, it's a texture set as the "Default Cursor" in Player Settings.

    What my beta tester seems to be describing is that, on El Capitan, waving the mouse cursor around can replace my custom cursor with an enlarged OS X standard cursor.

    I strongly suspect this is something I can't do anything about. Whether it's a "bug" or not is, I guess, up for debate, but my guess is the only way to prevent this behavior would be in Unity's code.

    Am I wrong? Because if there's something I can do in my game code/configuration to make this nicer (ideally allowing my custom cursor to be scaled in accordance with El Capitan's behavior, instead of being replaced by El Capitan's own cursor) then I'd love to do it.
     
  2. invicticide

    invicticide

    Joined:
    Nov 15, 2009
    Posts:
    109
    Oh, I should also mention: when my tester says he can only get this to happen in the menu and not in-game, the reason for that is that in-game I've disabled and locked the cursor, so it never appears at all.
     
  3. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    In window's you can turn off the accessibility settings in the OS. Most gamers do after a getting kicked out of games a couple of times for spamming the shift key. Not sure if the same setting exists on the Mac system.
     
  4. SteveJ

    SteveJ

    Joined:
    Mar 26, 2010
    Posts:
    3,066
    The setting can be turned off in El Capitan via System Preferences --> Accessibility --> "Shake mouse pointer to locate". At least you can tell your users how to turn it off. I doubt that it's something you can "fix" from within Unity.

    Interesting post though - I'll have to try this in my game where I'm also using a custom cursor. I turned off that OS feature within the first couple of hours because it was bugging me :)