Friday, 17 January 2014

Unity: Embedding Unity Web Player into Blogger

Testing embedding a unity web player into Blogger. The files are hosted on a public Dropbox folder.

I created a simple plane and sphere in unity and added the mouse orbit script to the camera to add some functionality. Then I exported using default web player settings and uploaded both the .html and .unity3d files to a public folder on Dropbox

I tried many ways of embedding onto Blogger, but in the end found that this link:

[there is an updated iframe gadget url in the comments]

Using the HTML code in Blogger, I added the code:

<iframe height="440" name="Test" src="http://www.gayasoft.ch/bloggergadget/UnityIFrameGadget.php?url=http://dl.dropboxusercontent.com/u/2515267/Builds.unity3d&amp;width=560&amp;height=420" width="590">...</iframe>

Worth noting from the blog post is I needed to add a "<"  before the iframe and a "</iframe>" to close the code. Also when pointing to a Dropbox url you need to change the "https://" to "http://" to allow a public link regardless of it being in a public folder.

Finally if you want to have text in a blog post with the embedded webplayer, you need to surround the webplayer code with a body (<body></body>)


1 comment: