npapi chrome_Chrome NPAPI弃用后的网络发布
npapi chrome
With Google about to complete the deprecation of NPAPI support in their Chrome browser, we’ve been receiving some questions about what the best options are for publishing games on the web and reaching Chrome users at the same time. Given Chrome’s wide usage, these are fair questions.
随着Google即将在其Chrome浏览器中完成对NPAPI支持的弃用,我们已经收到了一些有关在网络上发布游戏并同时吸引Chrome用户的最佳选择的疑问。 考虑到Chrome的广泛使用,这些都是公平的问题。
NPAPI Deprecation
NPAPI弃用
On the off chance that you’re creating web games and hearing about this for the first time, here’s a quick overview. In 2013, Google announced that they would be deprecating and then disabling NPAPI, the plugin framework that Unity Web Player relies on to enable the richest interactive content experiences on the web. Currently, there is a workaround to get the NPAPI support back on in Chrome, but Google plans to completely remove NPAPI support from Chrome in September 2015. There is not an explicit timetable for NPAPI deprecation in other browsers, though it will happen.
在您首次制作网络游戏并初次听说此游戏时,这里有个简短的概述。 2013年,Google宣布将弃用NPAPI,然后禁用NPAPI,这是Unity Web Player用来在网络上实现最丰富的交互式内容体验所依赖的插件框架。 当前,有一种变通方法可以在Chrome中重新获得NPAPI支持,但Google计划在2015年9月从Chrome中完全删除NPAPI支持。尽管会发生这种情况,但在其他浏览器中尚无明确的NPAPI弃用时间表。
Following this announcement, we began serious investigations into alternate avenues for web games. We decided on moving forward with WebGL, which we announced at GDC 2014 and is now available in preview as a build target in Unity 5. You can read more about that here: http://blogs.unity3d.com/2014/04/29/on-the-future-of-web-publishing-in-unity/
宣布此消息后,我们开始认真研究网络游戏的替代途径。 我们决定继续使用WebGL,它是在GDC 2014上宣布的,现在可以作为Unity 5中的构建目标进行预览。您可以在此处了解更多信息: http : //blogs.unity3d.com/2014/04/ 29 /在网络上发布的未来/
The State of WebGL
WebGL的状态
What seems to be the obvious solution to this is simply to make games in WebGL. While this solution will eventually be excellent and we are working hard on WebGL with browser manufacturers like Mozilla, Google and Microsoft, the base WebGL technology is still limited in comparison to Unity Web Player. This includes a performance gap we are working to narrow though the issue is made more complicated by widely varying performance in different browsers. For more on WebGL performance, see our earlier blog post here: http://blogs.unity3d.com/2014/10/07/benchmarking-unity-performance-in-webgl/
显然,解决此问题的方法仅仅是在WebGL中制作游戏。 尽管此解决方案最终将是出色的,并且我们正在与Mozilla,Google和Microsoft等浏览器制造商一起努力开发WebGL,但与Unity Web Player相比,基本WebGL技术仍然受到限制。 这包括我们正在缩小的性能差距,尽管由于不同浏览器的性能差异很大,使问题变得更加复杂。 有关WebGL性能的更多信息,请参见此处的早期博客文章: http : //blogs.unity3d.com/2014/10/07/benchmarking-unity-performance-in-webgl/
WebGL is totally feasible for “lighter weight” web games and apps in it’s current state but it is important to set realistic expectations. It’s unlikely that you’ll be able to simply float your game over from Unity Web Player and expect everything to work perfectly. Heavy games with high performance needs will likely find the WebGL option currently won’t fit their needs due to the aforementioned performance gap, some other platform limitations like networking, and scalability issues due to build sizes and browser-side memory constraints. Unfortunately, because the technology is still in heavy development, both on our side and on the browser side, we cannot provide support through our premium support channel before we have a full release. In the meantime, the best place to discuss WebGL issues is on the forums (http://forum.unity3d.com/forums/webgl.84/) where our developers are very active.
WebGL对于目前“轻量级”的网络游戏和应用程序是完全可行的,但设定切合实际的期望很重要。 您不可能简单地将游戏从Unity Web Player浮动下来,并期望一切都能正常工作。 由于上述性能差距,一些其他平台限制(例如网络)以及由于构建大小和浏览器端内存限制而引起的可伸缩性问题,具有高性能需求的重型游戏很可能会发现当前无法满足其WebGL选项的需求。 不幸的是,由于该技术在我们和浏览器这两个方面仍在大量开发中,因此我们无法在正式发布之前通过高级支持渠道提供支持。 同时,讨论WebGL问题的最佳位置是我们的开发人员非常活跃的论坛( http://forum.unity3d.com/forums/webgl.84/ )。
There is a silver lining!
一线希望!
The great news is that Unity and the browser manufacturers are collaborating closely to solve these issues! Everyone involved is very invested in ensuring WebGL achieves its great potential so we have every reason to believe that WebGL will make developer and gamer lives better in the long run.
好消息是,Unity和浏览器制造商正在密切合作以解决这些问题! 参与其中的每个人都为确保WebGL发挥其巨大潜力而投入了大量资金,因此我们有充分理由相信WebGL从长远来看将使开发人员和游戏玩家的生活更好。
The State of the Unity Web Player
Unity Web Player的状态
The Unity Web Player is still the best option for high performance games on the web. Given this, we will continue supporting it for as long as it’s useful for developers.
Unity Web Player仍然是网络上高性能游戏的最佳选择。 鉴于此,我们将继续支持它,只要它对开发人员有用。
It’s also very important to note that Unity Web Player still works beautifully on other browsers outside of Chrome, so there are options.
还有一点很重要,请注意,Unity Web Player在Chrome之外的其他浏览器上仍然可以很好地工作,因此有很多选择。
So what do I do if my game needs the Web Player?
那么,如果我的游戏需要Web Player,该怎么办?
If your existing game requires the Web Player to run properly (especially for those of you with complex high performance games), here’s some suggestions of what you can do in the meantime:
如果您现有的游戏要求Web Player正常运行(尤其是对于那些拥有复杂高性能游戏的人),那么以下是您在此期间可以做什么的一些建议:
Option A: Encourage players to use alternate browsers where plugins are still available. Create a page to pop up when the plugin won’t start that informs people of what has happened and list browsers that still work well with your game.
选项A:鼓励玩家使用仍可使用插件的备用浏览器。 创建一个页面,以在插件无法启动时弹出窗口,通知人们发生了什么,并列出仍可与您的游戏配合使用的浏览器。
Option B: Provide instructions on how to allow plugins to function in Chrome before the plug gets pulled completely on NPAPI in September (at which point there is no way to enable NPAPI plugins. Sample instructions follow:
选项B:在9月将插件完全拉到NPAPI上之前,提供有关如何允许插件在Chrome中运行的说明(此时无法启用NPAPI插件。示例说明如下:
Step 1: In Chrome’s address bar, type: chrome://flags/#enable-npapi
步骤1:在Chrome浏览器的地址栏中,输入:chrome:// flags /#enable-npapi
Step 2: Find “Enable NPAPI Mac, Windows” in the list, and click “Enable”
第2步:在列表中找到“启用NPAPI Mac,Windows”,然后单击“启用”
Step 3: Hit the “Relaunch Now” button at the bottom of the page
第3步:点击页面底部的“立即重新启动”按钮
What if I’m developing something new?
如果我正在开发新的东西怎么办?
We recommend that those of you creating new web games with Unity start new projects with Unity 5 WebGL as the default target. WebGL games are more limited in terms of functionality and performance than Web Player games, so you can port your game to the Unity 5 Web Player later if you choose and add some additional functionality to leverage the greater capabilities of the Unity Web Player. This way, gamers will be able to play a WebGL game on Mozilla Firefox, Google Chrome, Apple Safari 8.x or play it as a Unity Web player game on Microsoft Internet Explorer, Apple Safari 7.x, or Yandex.Browser which should provide the widest audience possible.
我们建议您使用Unity创建新的网络游戏的人以Unity 5 WebGL作为默认目标来启动新项目。 WebGL游戏在功能和性能方面比Web Player游戏受到更多限制,因此,如果您选择并添加一些附加功能以利用Unity Web Player的更大功能,则可以稍后将游戏移植到Unity 5 Web Player。 这样,游戏玩家将能够在Mozilla Firefox,Google Chrome,Apple Safari 8.x上玩WebGL游戏,或者在Microsoft Internet Explorer,Apple Safari 7.x或Yandex.Browser上作为Unity Web播放器游戏玩。提供尽可能广泛的受众。
Keep in mind that with Google well on their way to removing NPAPI support from Chrome entirely, other browsers will follow suit. This eventuality (there are no confirmed timetables for this) makes it very hard to recommend beginning new projects with the Web Player in mind at all.
请记住,随着Google完全从Chrome删除NPAPI支持的方式,其他浏览器也将效仿。 这种偶然性(没有确定的时间表)使得很难建议完全考虑到Web Player的新项目。
The short of it
它的短处
WebGL will be amazing – even better than The Unity Web Player because there will be no plugin barrier for players – but there’s no avoiding that it’s not yet as capable as the Unity Web Player and there’s no spectacular technological option to get around the deprecation of the framework that made it possible. We understand this is a rough transition and feel your pain as we would love the Web Player to continue functioning across all browsers, but unfortunately that decision ultimately is not ours to make. For the time being, if you’re maintaining a very complex game that you want to run well on the web, you’ll need to use the Web Player and direct customers to other browsers.
WebGL将会是惊人的-甚至比Unity Web Player更好,因为不会对播放器造成插件障碍-但无法避免的是它还不如Unity Web Player强大,并且没有出色的技术选择来解决不推荐使用的技术。使之成为可能的框架。 我们知道这是一个艰难的过渡,您会感到痛苦,因为我们希望Web Player能够在所有浏览器中继续运行,但是不幸的是,最终决定不是我们要做的。 暂时,如果您要维护一个非常复杂的游戏,并且希望在网络上良好运行,则需要使用Web Player并将客户定向到其他浏览器。
And we’ll keep collaborating with browser manufacturers to make the WebGL platform and our WebGL tools as powerful as we know they can be!
而且,我们将继续与浏览器制造商合作,以使WebGL平台和我们的WebGL工具发挥出我们所知的强大功能!
翻译自: https://blogs.unity3d.com/2015/05/28/web-publishing-following-chrome-npapi-deprecation/
npapi chrome