Search Unity

Мы получаем большое количество вопросов от разработчиков игр, которые обеспокоены будущим веб-гейминга вообще и Unity Web Player в Google Chrome в частности, поэтому мы решили подготовить пост об этом.

Осенью 2013 года Google сообщил о планах прекращения поддержки NPAPI в браузере Google Chrome к концу 2014 года. NPAPI – это API, который позволяет запускать нативный код в браузере и на котором основан Unity Web Player.

Мы не знаем точно, когда именно NPAPI перестанет поддерживаться, но ожидаем, что Google будет придерживаться своих планов. Суть в том, что когда Google отключит NPAPI, Unity Web Player больше не будет работать в Chrome.

Мы думаем, что платформа Unity Web Player – это самая эффективная технология для игр в вебе, и мы обязуемся поддерживать ее так долго, насколько современные браузеры сделают это необходимым. То есть, как минимум, на протяжении 2015 года. Даже если ваша игра перестанет работать в Google Chrome, она будет работать в других браузерах, таких как Mozilla Firefox, Microsoft IE и Apple Safari.

Мы знаем, что многие из вас создают прекрасные игры, используя технологию Unity Web Player, и вы зарабатываете на этих играх. И мы будем держать вас в курсе того, как развивается разворачивание под веб.

Наша команда разработки обязуется активно поддерживать Unity Web Player, более того, несколько недель назад мы обновили поддержку для 64-битного Unity Web Player – теперь он работает в 64-битных IE 11 64 bit и Chrome на Windows. Мы работаем над тем, чтобы 64-битный Unity Web Player также работал на OS X, поэтому он может работать в Chrome 64, после того как Google прекратит поддержку 32-битного Chrome на OS X.

Мы знаем, что дни запуска нативного кода в браузере сочтены. Существует слишком много плагинов, которые работают не очень хорошо, и это влияет на безопасность. Хотя мы прилагаем много усилий, чтобы наши плагины работали корректно – это делается через автоматическое обновление, мы согласны с тем, что, в долгосрочной перспективе, поддерживать нативный код в браузерах – слишком большая ответственность для разработчиков браузеров.

Мы активно работаем над поддержкой WebGL в Unity 5.. Мы уверены, что это самое лучшее и самое безопасное долгосрочное решение для запуска 3D и 2D контента в браузерах. Публикация под WebGL в Unity 5 будет бесплатна, и это позволит вам работать с вебом без плагинов.

Мы сотрудничаем с разработчиками браузеров, чтобы улучшить производительность игр на WebGL, и та производительность, которая есть сейчас, многообещающая: в некоторых случаях наш WebGL работает также быстро, как и нативный код.

Вы можете прочитать больше о бенчмарках Unity WebGL в посте, и также вы можете попробовать WebGL в Unity 5 – бета доступна по предзаказу для подписчиков и всех, кто сделал предзаказ на Unity 5 пару дней назад. Как только мы выпустим Unity 5, инструменты WebGL будут доступны бесплатно.

Комментарии закрыты.

  1. Last week, we noticed that our WebPlayer games stopped working for users on Chrome 39.

    HOWEVER, if end-users install the 64-bit version of the WebPlayer, games continue to run in Chrome 39.

    Can you please clarify if Google is certainly going to stop WebPlayer support in a subsequent update to Chrome, whether it’s 32-bit or 64-bit player? If so, is there an ETA?

  2. I can also confirm that it does not work in chrome anymore. However, it works in Safari and Firefox now. Will be looking for upcoming solutions.

  3. Well, it would seem the day is here, Chrome 39 just auto-updated on osx, and the webplayer no longer works with it.

    Is there any sort of ETA on the osx-64bit support?

    1. +100000 for this!

  4. Chrome may drop NPAPI, but it still will have PPAPI, which is largely similar. How about that, UT?

  5. Official Opera support for Unity’s WebGL please.

  6. We have industrial customers using Unity3D web applications with Chrome deployed on their company network. If for any reason they cannot switch to another browser easily the end of the webplayer support will be a major issue, and we believe the port to Unity5 WebGL is unlikely to be feasible before mid 2015. As a backup plan, is it possible for a company to maintain a legacy version of Chrome that supports the webplayer until their Unity3D application have been forted to WebGL? My question is, could Unity folks communicate to us developers if that option is viable, if Google enables it in any other way than disabling auto update (in a similar fashion that they do have a legacy browser support option for companies that need to support old websites with ActiveX). We of course look at these possibilities on our end, and switching to another browser is the easiest solution, but it would be greatly appreciated if Unity folks could give us feedback on what options exist for large companies with unity webplayer projects that need to stick with Chrome for whatever reason.
    Thanks

    1. «As a backup plan, is it possible for a company to maintain a legacy version of Chrome that supports the webplayer until their Unity3D application have been forted to WebGL?» — of course it is possible and Unity webplayer should continue to run on older version of Chrome.

  7. This is probably a well known and beaten up issue, but what about protecting the code and / or content?

    How is Unity planning to handle WebGL volunrability in this area, if at all?

    Thanks.

  8. Unity3D should have stuck with export to Flash Player, which still works in Google Chrome’s new PPAPI model.
    Flash’s Stage3D GPU technology has come a long way.

    1. Flash is a menace on the face on mankind a must be eradicated.

  9. Very informative post. Many thanks.

    http://dimensionthree.net

  10. How that would influence Unity’s Ultimate Input Manger. Would that mean that Unity would use new Gamepad API’s
    http://unity3de.blogspot.com/2014/07/unity3d-inputmapper-joystick-in-web.html

    1. We’ll definitely be using whatever APIs we can/should/must on each platform. My guess is that for WebGL we’re going to be faced with unstable/evolving APIs for a while and may have to accept some temporary shortcomings compared to what’s available natively, but judging from what’s currently happing out there, this is only going to be a transient issue.

  11. what about outdoing links? Will it work in WebGL as in Flash?

  12. So, after it’s discontinued by Google, UT will remove Publish to Unity Web Player platform fully? or will it continue to be available and working fine in other browsers?

    1. He said this in the post:

      Currently we think that the Unity Web Player platform is the most efficient technology for gaming on the Web and we are committed to supporting it for as long as the browser landscape means it makes sense to do so. That means throughout 2015 at the very least. Even if your games cease to run on the Google Chrome browser, they’ll still work on other browsers such as Mozilla Firefox, Microsoft IE and Apple Safari.

      1. Okay Thanks! I missed the «will continue to work in other browsers» part.. So I guess that means Unity Web Player won’t be removed.. I guess :-)

  13. Would we be able to have full right mouse control in WebGL without disabling right mouse click menu through HTML code like in unity web player. i like to see those three selection move to the F10 — F12 key. i played some game in the unity player that was good but that right click menu was not disable by the developer and it made the game annoying to play.

  14. Are there any handicaps to using WebGL. Will it include full c# support ? I would assume so but have never head of c# being used on the web client side without a plugin.

      1. Yes. We use our IL2CPP backend to convert C# code into C++ code and then into JavaScript code. It actually works quite well & on some browsers the generated code in asm.js can outperform the JIT code by mono.

        Long term IL2CP will be our most native .NET backend with the best performance across all platforms.
        http://blogs.unity3d.com/2014/05/20/the-future-of-scripting-in-unity/

  15. I recently ran into a problem running WebGL stuff smoothly in Chrome. It would work in Firefox just beautifully, but in Chrome it would just bog down and be practically unusable.

    The solution turned out to be a flag in chrome://flags that was preventing Chrome from using my video card. Specifcally it was the chrome://flags/#ignore-gpu-blacklist flag. Once I enabled that, all WebGL stuff ran beautifully in Chrome.

    Just a heads up for anyone finding WebGL stuff in Chrome running extremely slow (or not at all).

  16. Maybe I’m mistaken, but aren’t they going to continue to support the alternative PPAPI? Is there a reason that Unity Web Player can’t function under PPAPI?

    1. Unity’s export to NaCl was also good option but it is dropped…

    2. PPAPI is more restrictive: we can’t run existing Unity Web Player content due to the number of significant restrictions in this model, for example PPAPI only supports OpenGL ES 2.0 while existing Unity Web Player games could use full capabilities of OpenGL or DirectX 11. To sum up, support of PPAPI by Unity does not solve anything: every single existing Unity Web Player game would need a non trivial port effort to PPAPI web app model which would work only in one browser — Chrome. Instead we decided to focus on WebGL — the technology that is going to be supported on all browsers. The downside is that existing Unity Web Player games will need to be redesigned for that, but same problem would exist for PPAPI anyway.

      1. Then I think Unity should continue the support of NaCl as INDY says. It should support native stuffs like NPAPI.

      2. Hm, thx for the clarification on PPAPI! On one hand understandable that you guys don’t want to put too much effort into a single browser and focus on WebGL, then again have you looked at Chromes marketshare recently? If I’m not mistaken its in the 40-50% ratio now and top browser, which should deserve some special attention :)

        Could you remind us what the issue with NaCL was? Similar restrictions like PPAPI? We’re running a big online MMO in the browser and it’s not really viable to tell our users, heck wanna try our game, install another browser first ;) WebGL is really exciting but it’s not all the way there yet to allow a quick conversion…. We’re planning to release a client version soon as a fallback for Chrome users, not the best but better then «Use Firefox, dear user». Thx in advance for your time!

        1. PPAPI is cross-platform API for Native Client-secured web browser plugins meaning that NaCl works via PPAPI and has same issues i mentioned: runs only on one browser, has various limitations for ex. supports only OpenGL ES 2.0, game developers would need to remake their Unity Web player projects — existing games would not work as Native Client web browser plugin.

          The reason why we dropped it more than a year ago ? Nobody was using it. Another limitation at that time: Native Client apps could only be published on Chrome App store, you couldn’t give an url to your friend to play your game — browser would not let you run it.

      3. Well, WebGL is based on OpenGL ES 2 as well. If you want an optimized 3D web solution you will probably need something like Three.js or Blend4Web

  17. Do you folks foresee any eventual difference between the free and Pro version of Unity when deploying to WebGL/HTML5?

    For instance, will there be a Unity logo requirement (or similar «restriction») for non-Pro licensees?

    1. Yes, there is going to be similar restrictions of Unity Free license we have for other platforms including Unity logo requirement.

  18. it is such a huge deal that you haven’t fixed the big problem that the unity window will not be focused if you play it on chrome by running the once :) such commitment unity ! :)

    1. Scnoobi, thanks for your input, we are looking at this problem.