On the future of Web publishing in Unity

April 29, 2014 in Technology

A few weeks ago at GDC, we announced support for WebGL publishing for Unity 5. Now I’d like to share some more information on what this is all about, and what you can expect from it.

Some background

WebGL is a 3d graphics library built into the browser which allows JavaScript programs to do 3d rendering inside any supported browser without requiring any plug-ins. To us, this always seemed like a perfect fit for running Unity content on the web, as it would give end users the most barrier-free experience – as the browser would supply everything needed out of the box, and everything would just work without the user bothering with installing any plug-ins.

WebGL_500

However, we initially had some doubts on whether this would be technically achievable, as  WebGL is a JavaScript API – which means that all our code (both our Unity runtime and your game code) needs to run in JavaScript somehow. But at the same time, we thought that this technology was too cool not to try it anyways, so we started experimenting with it at a HackWeek in Copenhagen two years ago. Also we had been talking to Mozilla around that time, who have been very eager to help us and to proof to us that this can indeed be done – so they had some engineers come over to Copenhagen to join the fun.

It took us a few more HackWeeks of tinkering around and some developments on the browser side as well, until we reached a point where we realized that we could make a real viable product out of this – which is when we started going into real production.

To give you an idea of what is possible right now, here is a Unity player exported to WebGL with a current alpha version of Unity 5

Currently supported browsers for this content are Firefox and Chrome 35 (Chrome 35 is currently in beta, and is needed, as the current Chrome 34 release version has a JavaScript bug which is causing this game to hang).

Click the icon below to play Dead Trigger 2 by Madfinger games in your browser, demonstrating an immersive fullscreen FPS experience in WebGL. Controls are WASD to walk, mouse to look, Q to switch weapons, Tab to switch to Melee combat, and 1, 2, and 3 for special powers (try them!).

DEAD-TRIGGER-2-Icon

And here is a build of our classic AngryBots demo (which runs fine on Firefox and the release version of Chrome):

angrybots

Technical details

As mentioned above, to run in WebGL, all our code needs to be JavaScript. We use the emscripten compiler toolchain to cross-compile the Unity runtime code (written in C and C++) into asm.js JavaScript. asm.js is a very optimizable subset of JavaScript which allows JavaScript engines to AOT-compile asm.js code into very performant native code (see here for a better explanation).

687474703a2f2f646c2e64726f70626f782e636f6d2f752f38303636343934362f656d736372697074656e5f6c6f676f2e6a7067

To convert the .NET game code (your C# and UnityScript scripts) into JavaScript, we developed a new technology in-house which we call IL2CPP.  IL2CPP takes .NET bytecode and converts it to corresponding C++ source files, which we can then compile using any C++ compiler — such as emscripten to get your scripts converted to JavaScript. Expect more information on IL2CPP soon.

 

WebGL in Unity 5.0

We plan to WebGL support available in Unity 5.0 as an early-access add-on (before you ask: the terms and prices of this add-on have not been decided on yet). Early-Access means that it will be capable of publishing content to WebGL (like the examples above), but it will have some limitations in features and in browser compatibility. In particular, the following features will not be supported:

  • Runtime generation of Substance textures
  • MovieTextures
  • Networking other then WWW class (a WebSockets plug-in is available)
  • Support for WebCam and Microphone access
  • Hardware cursor support
  • Most of the non-basic audio features
  • Script debugging
  • Threads
  • Any .NET features requiring dynamic code generation

In terms of browser support, this initial version will only support the desktop versions of Firefox and Chrome (other browsers might work for some content, but only these two will be officially supported).

We expect to resolve most of those limitations (except for things which are restrictions imposed by the platform) during the 5.x release cycle, and to be able to support a wider range of browsers as well as the platform matures – at which point we will drop the early-access label and make WebGL a fully supported build platform in Unity.

The Unity Web Player in Unity 5

While WebGL is a very exciting new technology, currently, the Unity Web Player is still the most feature-complete and the most performant solution for targeting the web with Unity, and will stay as a supported platform in Unity 5.x. It may be a very useful strategy to dual-publish your content using both WebGL and the Web Player, in order to get the widest possible reach for your audience.

Longer term, however, we expect that the performance and feature gap between the Web Player and WebGL will become much more narrow, and we expect that browser vendors will make the Web Player obsolete by dropping support for plug-ins, at which point WebGL will become the prime solution for targeting the web with Unity.

 

Comments (93)

Subscribe to comments
  1. Blend4Web

    July 8, 2014 at 2:29 pm / 

  2. Blend4Web

    July 8, 2014 at 2:28 pm / 

    Tutorials for open source Blender-WebGL game. It even works in Android and iOS browsers.

  3. Akira_san

    June 1, 2014 at 10:36 am / 

    Does DT2 require 64bit OS?

  4. Zexx

    May 27, 2014 at 11:04 pm / 

    If I may add a suggestion for your AngryBot game:
    It looks like fun, it’s got great graphics, but the controls are totally screwed up. Using W-A-S-D for movement is total nonsense. You have to setup only 2 keys: Forward (W) and backwards (A). That’s all. As I shoot the enemy I don’t wanna thing whether it’s north or south from me, I just wanna think whether I approach or back away from it. The direction is selected by the mouse. Please fix this, because the movement is now totally unintuitive.

  5. jonas echterhoff

    May 26, 2014 at 8:51 am / 

    @Edwin: We have gamepad support in WebGL, but it is not hooked up in this samples.

    @Indy: CPU requirements are a bit difficult to specify, as it depends a lot on the browser used and the performance of the javascript engines. We have seen AngryBots run fine on machines as low-end as current entry-model Chromebooks, however (or even run on some phones, but then, not so “fine”).

    @Akira_san: DT2 itself requires 512 MB of memory to run – but the browser needs to be able to supply that memory in a continuous array of bytes in JavaScript. Depending on the browser and OS used the amount of memory needed to supply that may be different. That said, i have seen this demo run fine on machines with only 4GB of memory installed, so it must be something about your setup.

  6. Akira_san

    May 26, 2014 at 8:06 am / 

    It turns out Dead Trigger 2 requires more than 4 gb of ram to load.

  7. Indy

    May 21, 2014 at 11:27 am / 

    What are current minimal CPU requirements for games like Angry Bots or Dead Trigger 2 and how this would be change in the future?

  8. Edwin Vega

    May 20, 2014 at 11:48 pm / 

    Really cool! I played the demo in Firefox 29.01; it runs fine, graphics surprise me. I have the generic 360 controller (gamepad) but it didn’t work. I used the keyboard and mouse.

  9. Ralph Hauwert

    May 20, 2014 at 1:39 am / 

    @MARK JOHNES assuming all goes well, no. I’m personally not aware of breaking api changes in 4.5.

  10. Mark Johnes

    May 17, 2014 at 9:05 pm / 

    PLEASE SOMEBODY ANSWER THIS!
    Any Assets ( I’m talking about toolkit, gui’s and extensions, not about 3d models ) that are compatible with 4.3.4, do they have to get updated to work on Unity 4.5 or not??

  11. craig

    May 14, 2014 at 12:58 am / 

    Waiting for unity 5 ,
    Visit Unityediy

  12. jonas echterhoff

    May 12, 2014 at 8:49 am / 

    @DAVER: mouse click will fire the weapon. Other controls are in the blog post: “Controls are WASD to walk, mouse to look, Q to switch weapons, Tab to switch to Melee combat, and 1, 2, and 3 for special powers (try them!).”

    @MatrixKP: Your computer should definitely be able to handle these games much faster. What browser and version are you using?

  13. MatrixSKP

    May 12, 2014 at 5:48 am / 

    Took me several attempts to get either demo to run on Firefox on Mac OSX 10.8.5. Mostly both demos hung on the loading screen (at end of progress bar, nothing being downloaded, waited a few minutes). Browser warnings for hung scripts several times, but clicking through eventually got everything laoded. Dead trigger demo did load and run after several attempts, but frame rate was about 1 frame every few seconds (iMac with i7 processor and 2GB graphics card), definitely not playable and browser performance was seriously impacted. Severe lag also prevents one from determining the controls (did I just attack and miss the animation?), so a quick list of commands on the splash screen may help for users like me that dont want to waste another 2 minutes being helpless zombie snack.

  14. daver

    May 11, 2014 at 10:14 pm / 

    OK, can somebody explain how you fire the weapon or swing the axe in Dead Trigger?

  15. Akira_san

    May 9, 2014 at 9:28 pm / 

    Intel 2 duo cpu 2.66ghz, 4gb ram, Geforce 9500 GT

  16. jonas echterhoff

    May 9, 2014 at 1:50 pm / 

    @Akira: Hearing back from Mozilla, this error seems to be, because we cannot allocate enough memory to run Dead Trigger 2 on your browser/OS. While we cannot fix that, we need to improve the error reporting on this.

  17. jonas echterhoff

    May 9, 2014 at 12:43 pm / 

    @Akira: Thanks, That may be the JS engine in Firefox running out of memory. I asked Mozilla for more info. Asm.js compilation seems to take really long in your log as well. What kind of machine is this?

    @JS: No, but it might be used for more platforms in the future. Stay tuned for a blog post explaining it better.

    @Peter: I expect MovieTextures to be added during 5.x, yes. It would not be a problem to have the current implementation running in WebGL, but I’d rather take advantage of the browser video codecs instead, for better performance.

  18. Peter

    May 8, 2014 at 9:16 pm / 

    Will movietextures at some point be supported? If yes, during the 5x cycle?

  19. Js

    May 6, 2014 at 8:31 pm / 

    Will IL2CPP replace mono?

  20. Akira_san

    May 6, 2014 at 8:26 pm / 

    I left it for some time. Here the log: http://pastebin.com/6HqUK9Am

  21. jonas echterhoff

    May 6, 2014 at 9:01 am / 

    @AKIRA_SAN: DT2 may take a while to load on slower machines, for Firefox to compile the asm.js code. Also, if you open the “Web Console” in the Developer tools in Firefox, does it show any errors?

  22. Akira_san

    May 6, 2014 at 7:49 am / 

    Im using win7 32b, Firefox 29 – Dead Trigger 2 dont run, only can see the unity3d load screen. AngryBots runs. The same on chrome beta.

  23. techtopz

    May 6, 2014 at 2:47 am / 

    Tried using unity2d for 2d game development…
    But I think AndEngine is better than unity2d..

  24. jonas echterhoff

    May 5, 2014 at 5:20 pm / 

    @DAVID DOWDY: Expect to hear more about it in another blog post soon.

  25. jonas echterhoff

    May 5, 2014 at 5:19 pm / 

    When anyone sees failures on this content, could you please explain how it fails? How far do you get, and then what happens? Then we can see how we can fix it, but “doesn’t work at all” does not help us much debugging this. Thanks!

  26. Josh

    May 5, 2014 at 5:16 pm / 

    Doesn’t work at all on firefox (latest version) and hardly runs on chrome (also latest.)

    Disappointing, but then anyone who’s kept track of the html5 debacle will be used to that feeling :(

  27. JON

    May 4, 2014 at 9:16 pm / 

    hmmm doesn’t work in Chrome at all… and Crashes in Firefox… for me, not a good start at all…

  28. David Dowdy

    May 4, 2014 at 5:18 am / 

    Jonas,
    Can you tell us more about UNET?? Is it a replacement to the existing networking for Unity? Will it be a pro or Free or a both version feature? When will it be available? Thanks..

  29. Kurt N

    May 3, 2014 at 8:19 pm / 

    Update: WebGL apparently was added to 3D TV technology http://really.ru/eng/news/vr-a-3d-hardware/1196-general-3d-announces-web-based-html5webgl-stereoscopic-3d-system.html

    I would love to have 5.1 surround sound streamed to my TV/Blu-ray player from a webgame/website.

  30. Kurt N

    May 3, 2014 at 7:10 pm / 

    Would it be possible that WebGL app/support be made for Smart TVs? I can imagine in the near future people accessing very high end websites that are not just game specific but can enter a virtual world and interact. One last thing.. Oculus Rift & virtuix Omni compatibility with WebGL? – would be pretty amazing.

  31. Dario Passariello

    May 3, 2014 at 2:37 pm / 

    That is great…. I’m really interested in this technology…. this is the future!…
    Please, take care the opportunity to have support for Oculus and 3Dconnexion 3D mouses.
    …. And, much important…. please consider the opportunity to have and 3ds max exporter plugins. Unity Rock. PS: I’m at your disposal is you need support.

  32. Unni

    May 3, 2014 at 2:32 pm / 

    How can we compile existing game in unity source code into webgl?

  33. Gregory Pierce

    May 3, 2014 at 4:02 am / 

    That the WebGL component isn’t part of Pro is a bit disappointing. It was one of the major drivers for wanting to upgrade – but now we need to reevaluate that for the time being.

  34. James Griggs

    May 2, 2014 at 2:07 pm / 

    Runs perfectly for me. Great work guys.

  35. jonas echterhoff

    May 2, 2014 at 1:46 pm / 

    @Nathan: I don’t believe that there are any features listed on http://unity3d.com/5 other then WebGL which are not planned to be part of the normal Pro license.

  36. Nathan

    May 2, 2014 at 11:30 am / 

    I hope someone of Unity reads this. If we pre-order unity 5, how we know what’s included in the Pro and what not? I was thinking WebGL was included. Before I upgrade my 4.x Pro, what can I suspect to be included without extra fees? I can’t read anywhere this kind of information.

  37. jonas echterhoff

    May 2, 2014 at 10:08 am / 

    @IULIAN: Substance support should definitely be possible on WebGL. For this, we are dependent on Allegorithmic porting Substance to WebGL, so it is outside of our hands a bit, but I’d be surprised if we would not have this working eventually.

  38. nobody

    May 1, 2014 at 6:16 pm / 

    what is working?

  39. Iulian Drug

    May 1, 2014 at 9:48 am / 

    Thank you for giving us more details :) What about the runtime generation of Substance textures on the WebGL platform? I understand it will not be possible in the early access version, but should I expect it to be available in the 5.x cycle?

  40. jonas echterhoff

    May 1, 2014 at 8:22 am / 

    @AMORANO: Yes and no – only Google announced a plan to drop plugins with a specific, non-to-distant time frame (it remains to be seen if they stick to that), which currently puts pressure on people to find alternatives ASAP. But you are right, I have no doubt that, longer term, all browser vendors will follow along.

    @Evan: WebGL will never support .NET sockets to directly work on UDP or TCP sockets as that is not exposed to JavaScript. But we already have a working wrapper to use WebSockets and WebRTC would also be possible. I expect that our upcoming built-in networking solution, UNET, will support WebGL using one of these protocols.

    @De-Panther: Yes, there is PPAPI. We could do a PPAPI plugin, but:
    -It would require us to build and maintain a custom plugin for Chrome only, which will never be used on other browsers.
    -Content would still have to be republished to use it, because PPAPI requires using Chrome’s renderer, which won’t run our existing shaders, so it would still not be backwards compatible with any existing games.
    -PPAPI is still a plugin architecture with all it’s downsides – from a browser vendor P.O.V, i don’t see any reason to keep this security hole open in the long term (once they won’t need it any more to support Flash).
    With these reasons together, it just does not seem to be reasonable to spend resources on this over WebGL.

  41. De-Panther

    May 1, 2014 at 6:07 am / 

    @jonas echterhoff:
    Google doesn’t remove support for plugins – it removes support for plugins that use NPAPI.
    Plugins based on PPAPI will work.

    But I don’t know what are the changes that unity need to do in order to support it.
    In their articles they say that PPAPI is based on NaCl, unity already have support for NaCl. I’m sure that there is still lots of work to do in order to make it work with PPAPI, but I don’t see why unity can’t do it.
    A reasons like costs and money are ok, but then don’t put the blame on Google.
    For years now there’s a flash player for chrome and flash player for the other browsers.

    I hope that WebGL will be mature enough when browsers won’t run the plugin

  42. Evan

    May 1, 2014 at 3:52 am / 

    I have just one small but extremely pertinent question.

    Does this :
    “(except for things which are restrictions imposed by the platform)”

    include this :
    ” Networking other than WWW class ”

    ???

  43. Amorano

    May 1, 2014 at 1:10 am / 

    @JONAS ECHTERHOFF

    Please be clear: It is NOT ONLY GOOGLE dropping support. ALL major browsers. No need to get people pissed off @ Google since everyone is doing it.

    And for everyone who does not know, it is going away, it is not a Unity thing, it is a Web Standards thing.

  44. jonas echterhoff

    April 30, 2014 at 10:28 pm / 

    @FRANKS GAMES: if browsers drop support for plugins, there is no way, we can make that content still work without republishing to WebGL, correct.

    @OLIVIER: Probably your GPU is not supported by Firefox for WebGL. Note that we don’t want to drop support for the Unity Web Player – it is Google who are talking about dropping plugin support.

  45. olivier

    April 30, 2014 at 10:03 pm / 

    WebGl does not work for me for following message appears:
    “You need a browser which supports WebGL to run this content. Try installing Firefox”
    But I already have the latest version of firefox!

    Please consider seriously not dropping the support for the Unity Web as it work perfectly,
    and as Unity said in previous post. It will never be as optimized as the native plugin.

  46. codemonkey

    April 30, 2014 at 9:21 pm / 

    @Jonas,
    So there won’t be any support for web plugins in 2015 and Unity will charge money for WebGL? Really? I mean, seriously?

  47. Franks Games

    April 30, 2014 at 7:57 pm / 

    This is very cool. But what about old unity webplayers and games? Will those still work?
    And what about websites like kongregate, wooglie, gamejolt, etc? There are thousands of published unity webplayer games on those sites. Does this mean that in the future all of them will no longer work unless the devloper rebuilds and publishes their game with WebGL?

  48. David

    April 30, 2014 at 7:07 pm / 

    Looks pretty cool, but can’t fire the weapon 0_o

  49. james

    April 30, 2014 at 3:25 pm / 

    would be cool if the game gave you some instructions. I swear I’ve pressed every button on my keyboard and nothing let me attack. I can move around, and I can switch weapons, but can’t figure out how to attack.

    Otherwise looks pretty good on my HP 14 Chromebook

  50. jonas echterhoff

    April 30, 2014 at 2:42 pm / 

    @De-Panther: If Google actually drops plugin support by then, then yes, that will be the case. I don’t like the situation any more then you, but this is not within our control.

  51. De-Panther

    April 30, 2014 at 2:35 pm / 

    @Jonas Echterhoff:
    So in the end of 2014, there will be no support of unity for chrome?
    Chrome won’t run the unity plugin, and the WebGL will still be just “Preview” version without some of the functions that we have in the plugin.

    I’m really exited about the WebGL extension, I just don’t think that it should be the replacement for the webplayer in the next year – maybe two or three years from now, when the browsers support for WebGL will be matured enough

  52. Suraj Rai

    April 30, 2014 at 1:20 pm / 

    Nowadays every one use computer and spend lot of time on internet. You shared some good point about webgl that is difficult to find. These points will help me to increase my knowledge about webgl. Your post is really nice and helpful for everyone. I hope, you will share some more such type of post in future. Thanks to share this post with us

  53. Num_T

    April 30, 2014 at 12:12 pm / 

    Agreed that it should be free! At the very least it should not be an additional license on top of the standard Pro license.

  54. Nathan

    April 30, 2014 at 9:04 am / 

    I was exited when I read about WebGL being supported in Unity 5. However I’m a bit disappointed to read that this addon will probably have a price. We bought Unity Pro for having those nice pro features and being able to publish for OS platforms and web. But reading about the future of plugins in browsers and unity plugin, makes me sad. I think this WebGL has a future, but I hope it will remain free as the other web solution was as well.
    I think support of any desktop OS and Web should remain a free selling point of Unity, so hopefully you guys keep it free.

  55. Jonas Echterhoff

    April 30, 2014 at 8:53 am / 

    @Chris: I don’t have an oculus to try this, but since we can go fullscreen and do image effects, I see no reason why it should not work.

    @Jonathan: It’s not like the setup we had for Flash was any less complex.

    @Ivan: Going to C++ has several advantages. We can use emscripten to emit optimized JavaScript, so we don’t have to reinvent the wheel, and also to have one pipeline for both our engine code and user scripts. Also, we will be able to use this technology for other, non-JS platforms in the future. As for encouraging people to use JS directly in Unity, “JavaScript” in Unity (I prefer to call it UnityScript) is not the same as browser JavaScript.

    @Andy: The problem with the play button not doing anything has to do with the content not being fully downloaded yet on a slow connection. Wait a bit and press it again. We are working on a fix.

    @De-Panther: We will no port our plugin to PPAPI (it would not be compatible with any existing content anyways, due to shader differences), because we don’t believe in doing a plugin which will work in a single browser only (What you wrote about WebGL, only for PPAPI it is actually the case, as there is only one browser which supports it, while all browsers are adding WebGL support these days).

  56. Mirza MF

    April 30, 2014 at 5:22 am / 

    Trying now, i hope it work

    im big fan of unity , dead trigger 2, and shadowgun

  57. De-Panther

    April 30, 2014 at 4:56 am / 

    What about the issue with chrome dropping support for the web player?
    http://blog.chromium.org/2013/09/saying-goodbye-to-our-old-friend-npapi.html
    You still can use PPAPI to build a unity web player, instead of NPAPI, as you have NaCl support already.

    I find the web player to be more reliable than WebGL who needs specific browsers and depends on the browser vendor.

  58. Andy

    April 30, 2014 at 2:12 am / 

    The Angry Bots looks good 7 it responsive with FireFox 28.

    Dead Trigger 2 couldn’t get past the ‘Play’ button although it went full screen with FireFire 28 so FireFox updated to FireFox 29.

    Now after the update Dead Trigger 2 got past Play and it took a while after that to actually play. I suppose it was loading things in the background.

    “A script on this page may be busy, or it may have stopped responding. You can stop the script now, or you can continue to see if the script will complete.” 3 times.

    The graphics didn’t look near as nice. I only have 1st i5 & 1st Intel Graphic HD though. Windows 8.1 with all patches.

  59. Ivan Kuckir

    April 29, 2014 at 11:48 pm / 

    Have you thought about making a direct compiler C# -> JS? I think there might be some performance loss in mid-phases. Your output JS would be shorter and probably much more easy to optimize in a browser.. Or encourage your users to use JS directly istead of C#.

  60. Jonathan

    April 29, 2014 at 10:42 pm / 

    Javascript, C++, .NET, C#, emscripten, custom transpilers, beta versions of a browsers…

    .. all so you guys don’t have to mention the word Flash. LOL.

    What has this world come to?

  61. Chris Miller

    April 29, 2014 at 10:32 pm / 

    Exciting to watch Emscripten bring WebGL to the mainstream and make C++ a realistic option for web-focused developers. How about Oculus Rift support?

  62. Wantoo Sevin

    April 29, 2014 at 10:10 pm / 

    Unity IDE does not seem to work on Linux. Are the dev tools used for these demo’s available to me or do they all require the Unity application?

    Corollary: when is the IDE coming out for Linux? I don’t see why using a game engine should mean I have to go purchase a closed OS.

  63. Jonas Echterhoff

    April 29, 2014 at 9:04 pm / 

    @MARK: We already support game controllers (though it is not set up in either of these demos). “Offline support” is more a matter of the browser to implement, but with Chrome, for instance, it is possible to have Chrome Web Apps installed locally for offline play.

  64. Mark

    April 29, 2014 at 9:03 pm / 

    Just had play with Dead Trigger and it makes me so excited for the future of web gaming, i’m sure performance will be tweaked in future versions but I’m hoping for Game Controller and offline support.

  65. Nathan

    April 29, 2014 at 8:38 pm / 

    Nice! Just played both demos on Manjaro (Linux) and they run great! :)

  66. Jonas Echterhoff

    April 29, 2014 at 8:33 pm / 

    @ABSCISSA: You need at least Firefox 27. All recent versions of Firefox are auto-updating which is why we did not specify this in the blog post (as most people are up-to-date), but maybe we should.

  67. Abscissa

    April 29, 2014 at 8:17 pm / 

    @Jonas Echterhoff: Shouldn’t be. It’s v22 which isn’t even a year old.

  68. Stephane

    April 29, 2014 at 8:00 pm / 

    Eagerly following the WebGL initiative. Smooth performing demos and very nice with an update on the subject.
    I have a question (I read through some but not all of the 7 pages of the “Are you OK ..”-thread).
    Q: Are you considering a free but severely limited version of the WebGL plugin?
    I really get that you need some return on the much more complex investment that WebGL represents. I’m just wondering about a very low-level hands-on experience available for Indy and/or pro.

  69. Jonas Echterhoff

    April 29, 2014 at 7:55 pm / 

    @ANLUMO: Yes, all the methods described in the Web Player will be possible in WebGL as well. On top of that, you will be able to just add JavaScript sources to your project and call functions from them directly from C# or UnityScript.

  70. Jonas Echterhoff

    April 29, 2014 at 7:53 pm / 

    @EDWIN YIP: yes, there are some similarities from IL2CPP to .NET Native – and some differences. Expect to hear more about it in a blog post some time in the future.

  71. anlumo

    April 29, 2014 at 7:38 pm / 

    Will it be possible to communicate between the Unity game and the JavaScript that’s on the same web page, just like in the old Web Player (manual section “Unity Web Player and browser communication”)?

  72. Jarrad

    April 29, 2014 at 7:03 pm / 

    Wow! Both of these demo’s are fantastic, sure I can now cook some eggs on my mac pro and it’s a little rough around the edges but the quality of these games that is running in my WEB BROWSER is phenomenal!

    Really can’t wait to get my hands on this.

  73. Kr0e

    April 29, 2014 at 6:53 pm / 

    Works perfectly with latest FireFox on OSX10.9.2 iMacLate2013, no lags or anything. Really smooth, actually smoother than most of the three.js demos. You guys are real heros, I was working on a game for quite some time and then everybody started to talk about Three.js and the future of gaming. Nice to see that Unity3d still keeps up. In my opinion this feature alone will be the killer pro-feature compared to UDK or CryEngine. Please keep up this great work!

    Btw: A newer Mono version would really help to use some libraries written for 4.0 or above. Mono-3 is pretty stable ;). It was a good choice to use C#+Mono.

  74. tzam

    April 29, 2014 at 6:48 pm / 

    It doesnt work for me, I’m using osx and the thing doesn’t work neither in firefox or chrome.

  75. Carlos Cervantes

    April 29, 2014 at 6:44 pm / 

    Really exciting stuff. The Angrybots demo played just like it does on the desktop. Can’t wait to try it out in the future.

  76. Edwin Yip - Dev of LIVEditor

    April 29, 2014 at 6:37 pm / 

    Hello, I’m quite interested in IL2CPP – how does it compare to Microsoft’s .Net native?

  77. Zethrok

    April 29, 2014 at 6:21 pm / 

    Took a little time to load and didn’t have high expectations, but both games did run on my aging Thinkpad T420 with Intel HD something gfx. It did lag at times tho, but nevertheless very impressive (and now I can finally play webbased games on linux! ).
    Now start porting Starcraft 2 to WebGL already!

  78. Indy

    April 29, 2014 at 6:12 pm / 

    These demos are so CPU demanding. Even if you have decent GPU you can’t be happy with smooth framerate if your CPU is not very fast.

  79. Jonas Echterhoff

    April 29, 2014 at 5:57 pm / 

    @Raj: yes, that is the plan (though we don’t have details yet, like price). There has been a bit of discussion about this on the forums before, I tried to explained the reasoning behind it a bit in this post: http://forum.unity3d.com/threads/235248-Are-you-OK-with-Purchasing-WebGL-Add-On?p=1562339&viewfull=1#post1562339

  80. Raj Dhillon

    April 29, 2014 at 5:46 pm / 

    That’s disappointing … when I pre-ordered Unity 5, I didn’t realize that this would be a separate add-on. I thought it was a pro-only feature. Oh well, I guess that will teach me to read things more clearly before ordering. If you will eventually drop support for the web player, does that mean that Unity Pro will eventually only be able to deploy to a browser with a separate paid-for add on?

  81. Alan Stagner

    April 29, 2014 at 5:45 pm / 

    Well, WebGL still isn’t quite there yet, but it’s getting there :)
    The Dead Trigger demo runs insanely slow in some parts, and I’ve got a really good GPU so I’m assuming it’s an issue with Javascript (does Chrome not support asm.js yet? That could be the issue)

  82. Jonas Echterhoff

    April 29, 2014 at 5:26 pm / 

    @ABSCISSA: Sounds like you may be using an old version of Firefox. Which version is this?

  83. Abscissa

    April 29, 2014 at 5:23 pm / 

    @greenland: Apple’s always had a thing against Ogg Vorbis, even iTunes has never supported it (that’s why I eventually ditched iTunes).

    Neither of the demos work for me in Firefox:

    Dead Trigger: “Unity” loading progress bar fills and then nothing happens. It just stays there with a full loading bar.

    Angry Bots: After the “Unity” progress bar fills, it says “Web Audio API is not supported in this browser”. After pressing “Ok” the page just goes black and then nothing happens.

  84. Arun kumar

    April 29, 2014 at 5:17 pm / 

    When will the Unity 5.0 be realeased … I am waiting for it eagerly Please someone tell me.

  85. Jonas Echterhoff

    April 29, 2014 at 5:00 pm / 

    @Indy, no, WebGL will not load web player content – but you can publish your content using both WebGL and the Web Player to target the widest possible audience.

    @Greenland – correct, lack of Ogg support is the reason for no audio in Safari. We might consider switching to mp3 in the future, but currently, Firefox does not support mp3 on OS X (and Safari has WebGL disabled by default). If needed, we might build a solution to dual-publish assets for different browsers, but i hope there will be one solution which works everywhere eventually.

  86. greenland

    April 29, 2014 at 4:52 pm / 

    Angry Bots works fine on Safari… except sound… I’m guessing that’s because it’s OGG and Apple is apparently trying to boycott open source.

  87. Indy

    April 29, 2014 at 4:48 pm / 

    Why WebGL is still considered as AddOn if it seems the only solution for web publishing from 2015? So will be there Unity for standalone Win, Lin, Mac and AddOn required for web?
    Will WebGL be able to load .unity3d scene files? would it be possible to create universal Unity WebGL player that could load webplayer files created in Unity 4 or older?

  88. Jonas Echterhoff

    April 29, 2014 at 4:42 pm / 

    @WENDELIN: threads cannot be implemented in JavaScript as there is nothing corresponding to them (WebWorkers cannot map the behavior of threads). I hope that this is something which will be added to the JS language in the future, but this is not something to wait for at this point (people still have very different opinions on the matter).

  89. Marcelo Oliveira

    April 29, 2014 at 4:36 pm / 

    This all seems cool but annoys me computers as computers get fast we find a way to bloat things unnecessarily.

    Old way: C++ > Byte Code

    New Way: C# > C++ > LLVM > asm.js > IMPLEMENTATION SPECIFIC MAGIC > Byte Code

    We are falling in the myth of the Sufficiently Smart Compiler.

    Relevant XKCD
    https://xkcd.com/801/

    :)

  90. Wendelin Reich

    April 29, 2014 at 4:34 pm / 

    Thanks for this exciting update! I can live with most of the limitations you mention, but lack of threads would be a dealbreaker to me. While the other limitations concern mostly just quality, threads may be required by one’s existing .NET code (as in my case). Is threads one of the limitations you plan to overcome before the full (non-early) release?

  91. jonas echterhoff

    April 29, 2014 at 4:27 pm / 

    @Jellybit: It appears that there are some server load issues getting those demos cached to the CDN nodes right now, so it may be that you need to try again in an hour or so.

  92. Jellybit

    April 29, 2014 at 4:26 pm / 

    Oh sorry. I meant “Chrome version 34.0.1847.131 m”.

  93. Jellybit

    April 29, 2014 at 4:25 pm / 

    This is so exciting to me, but so you know, the Angry Bots demo doesn’t run for me in version Version 34.0.1847.131 m. It takes forever for the load bar to show up, and then it instantly fills and hangs. The webpage doesn’t indicate that it’s downloading or anything.

Comments are closed.