I’m just about to dig into web integration more, and I’m finding four different official sources for how to embed a Unity web player into a page’s HTML:
-
The auto-generated HTML. Which Dreamweaver (I know, I know, but it has certain uses!) reports as being incompatible with the latest Internet Explorer in some way.
-
This manual page re making Unity content work in IE/ActiveX vs. others:
http://unity3d.com/Documentation/Manual/HTML%20code%20to%20load%20Unity%20Web%20Player%20content.html -
This manual page which says the auto-generated template doesn’t generate a consistent user experience, and offers alternative plugin-detection code:
http://unity3d.com/Documentation/Manual/Detecting%20the%20Unity%20Web%20Player%20using%20browser%20scripting.html -
This manual page which explains how to work better with ActiveX:
http://unity3d.com/Documentation/Manual/Publishing%20active%20content.html
Before I try to figure out how those four sources interact, and which ones supersede the others, is there an HTML template already existing for Unity that takes all four of those topics into account? All four seem necessary to insure the best experience and compatibility.
If not, I’ll work on making a template myself that takes all those into account, and will share it with the community.
Once I have that, I intend to add three optional extras to make a more capable version…
-
Loading screen customization:
http://unity3d.com/Documentation/Manual/Customizing%20the%20Unity%20Web%20Player%20loading%20screen.html -
Bi-directional browser communication:
http://unity3d.com/Documentation/Manual/Unity%20Web%20Player%20and%20browser%20communication.html -
Display of alternate content (be it text, Flash, or ideally a Unity screenshot) for people who don’t have (or choose not to install) the plugin–along with a link to get the plugin of course.
Those seven things, hopefully, will combine to make One HTML Template to Rule Them All In the process my goal is to make it validate for XHTML and CSS, and use CSS-P with no center tags, tables, or deprecated markup.
And I’ll want it to work (on SOME level) for all browsers, with OR without JavaScript enabled. So that at the very worst, everyone sees the alternate content.
Any advice on integrating those 4… er, 7… topics? Has it been done already?
(I know this may need to be revisited for Unity 2, but meanwhile I want to get the best template working for Unity 1.)