Search Unity

WebGL PointerEvents fail in Safari 9 and Safari 10 when built with Unity 2018

Discussion in 'General Discussion' started by kwikdev, Oct 22, 2018.

  1. kwikdev

    kwikdev

    Joined:
    Jun 13, 2013
    Posts:
    25
    Posting to help Unity 2108 developers trying to support Safari 9 or Safari 10 with WebGL.

    The website lists Safari 8 as a supported browser:
    https://docs.unity3d.com/Manual/webgl-browsercompatibility.html

    However, all PointerEvents FAIL in Unity 2018 in Safari 9 or Safari 10. The same Unity project will work as expected when built in Unity 2017.

    Observed:

    1. All Unity UI drag events work in Firefox, Chrome, Safari 11
    2. All Unity UI drag events fail in Safari 9 and Safari 10
    3. Project was built with Unity 2018.2.13f1
    4. The bug does NOT occur when built with Unity 2017

    This bug was reported to Unity with super-basic drag demo but closed as "won't fix"

    Response from Unity:

    "So the developers had a look at this issue and this is what I got from them: Since this only affects Safari 10, I assume it's a bug in Safari itself that got fixed in version 11. Therefore we are not going to fix it on our side. I am sorry but this will not be fixed, I recommend upgrading Safari to version 11. I will be closing this case now."

    Hmmm. It doesn't add up that Safari 8 support is listed, all drag events work in 2017, and all drag events fail in 2018. Or that it's a "bug in Safari" rather than something that was changed in Unity 2018.

    Conclusion: Safari support is listed as Safari 8+ but your game will fail badly if you use ANY of the Unity UI PointerEvents. So to use Unity 2018 WebGL you will have to write JavaScript to check for Safari version 9 or Safari 10, then alert that players cannot play your game without an upgrade.

    Unity 2018 has excellent improvements to WebGL such as a 10 second faster load time, so we chose to take this JavaScript alert route rather than continue to build in Unity 2017. IMHO, Unity ought to upgrade the website to list ONLY Safari 11 support as of 2018.

    To be clear, Unity 2018 does an astonishing job delivering plugin-free 3D gameplay, and the new WebGL assembly is far faster than before. An ideal solution would maintain Safari 9, 10 support for a little longer.
     
  2. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 20, 2015
    Posts:
    4,275
    I don't agree with this. It's always a good thing to force the users as much as possible to have an uptodate browser. Even the Mac users.

    I think if you publish stuff on the web, you need to check what kind of browser your users have and message them if they are using not supported browser regardless. At least it would be the good thing to do. So in theory you just would add these browsers to the unsupported list.

    Always ask the users to update their browsers, it's good for them, it's good for you.
     
  3. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,465
    Except Apple pointedly cuts off updates for users with older hardware. Its also not unusual for enterprise to stick to older software versions that are tested as stable with their particular products.
     
  4. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    5,829
    It's called a regression and it happens all the time.
     
  5. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 20, 2015
    Posts:
    4,275
    Well, Apple is wrong, as usual.
     
  6. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,465
    Yeah, but being wrong doesn't stop them from being big and having a lot of money.
     
  7. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    14,415
    I don't agree. Safari 9 and 10 are basically dead.

    July 2017 - Safari 9 - 1.39% market share
    https://www.w3counter.com/globalstats.php?year=2017&month=7

    May 2018 - Safari 10 - 1.89% market share
    https://www.w3counter.com/globalstats.php?year=2018&month=5

    Both of the above numbers are the only ones I was able to find before they disappeared off of all lists.

    You'd have to be on seriously out of date hardware to not be able to run Safari 11. Safari 11 only requires OS X 10.11 which can be installed on hardware as old as 2007 to 2009 depending on the device. That's insanely old. Most businesses would have long since replaced their hardware at that point.

    https://support.apple.com/en-us/HT206886

    Examples:

    https://everymac.com/systems/apple/...20-inch-aluminum-early-2008-penryn-specs.html - iMac
    https://everymac.com/systems/apple/...-2.0-aluminum-13-late-2008-unibody-specs.html - MacBook

    Yes, but wouldn't that apply to Unity too? I'd imagine anyone still on Safari 8/9/10 would still be on Unity 5/2017.
     
    Last edited: Oct 24, 2018
    Kiwasi likes this.