I noticed that the Unity WordPress Plugin is ridiculously out of date and only supports up to Unity 2 if you want to show your projects using the Web Player.

So I started modifying the original plugin made by Tom Higgins and have Unity 3 projects working via the same syntax. It’s definitely a hacked together job, but it totally works for whatever I threw at it.

You can download it here: Download

Just unzip the file into your plugins directory in wp-content. You can use the exact same syntax as the original when writing posts. Just write something like this:

[WP_UnityObject src=”http://www.yourdomain.com/yourfile.unity3d” width=”640″ height=”480″/]

Let me know if you find any bugs or want any features and I’ll try my best to update the plugin.

26 comments so far

Add Your Comment
  1. Adam,
    Thanks for creating this plugin. I have a problem using it, though. My height parameter looks like it is being ignored. My player is always a square, with both width and height using the width parameter value.

    Any idea why this might be happening?


    • Nevermind, I already got it figured out. Looks like where you grab the width/height parameters in the php file you grabbed the width parameter twice.

      unityObject.embedUnity(“unityPlayer”, “‘.substr($tUOParams[0],5,-1).'”, ‘.substr($tUOParams[1],7,-1).’, ‘.substr($tUOParams[1],7,-1).’);

      Should be:
      unityObject.embedUnity(“unityPlayer”, “‘.substr($tUOParams[0],5,-1).'”, ‘.substr($tUOParams[1],7,-1).’, ‘.substr($tUOParams[2],8,-1).’);

      • Nice find! I’ll update GitHub with this change as soon as I can.

  2. Thanks! With Avidesk’s bugfix, it worked really well for me!

  3. hi ive installed it but i dont understand how to link my game to it?

  4. Hello Adam, I’ve downloaded and installed your plug-in into my wordpress site. However, when I embed the Unity3d file, all I see is the “Unity Web Player: Install Now!” banner.

    The text I’ve embedded into my post.
    [WP_UnityObject src=”http://www.penguinofdoom.com/unity/AStar.unity3d”/]

    For now my post is at: http://www.penguinofdoom.com/this-is-a-test-post/

    I looked at the file but my knowledge of php is limited. I’m assuming that the plugin is failing to detect my Unity install properly. I’m using WordPress 3.4.2 and my host is iPage if that makes a difference.

    • Hey there, I’ll look into this tonight and email you what I find out. :)

      • Thank you very much, anything would be useful. I reverted back to the Unity 2.0 plug-in and it started working under some conditions (No image or any other options) but I’d rather have click and image to invoke so that my blog doesn’t flood with players. For now I’ve restored back to your version so you can check it out. I’m wondering if there’s some sort of setting on my wordpress set up that’s preventing it but now that I got 2.0 to invoke a couple times I’m not sure that’s it.

      • Hey Adam, so after looking at it some more if I reactivate the old plug in (from Unity’s site) it seems that it DOES NOT like my unity3d file on my host. If I host the unity3d file on dropbox it works fine. It seems I might have a 2mb file limit or something. Stupid host, I just renewed last month.

        I tried your plug-in either way and it still didn’t seem to take with the same problem. For the time being I’ve reactivated your plug-in.

        • Hmm, the file size shouldn’t matter unless it’s a hosting thing. I’ve tried the plugin on larger files and it worked fine. Do you get any errors or anything?

    • How did you get it to work where you click the image and then the game loads?
      I have tried that with the following code:
      [WP_UnityObject altimage=”http://www.yourdomain.com/yourimage.jpg” src=”http:// http://www.yourdomain.com/yourfile.unity3d“/]
      No luck…
      It does work with this line though:
      [WP_UnityObject src=”http:// http://www.yourdomain.com/yourfile.unity3d“” width=”800″ height=”600″/]

      Help me please!

  5. Adam

    Thank you for updating this plugin.
    I now have just one small problem where the webplayer refuses to play and is stuck on the install the webplayer button.
    Here is the post: http://niels.svanschooten.nl/?p=62
    Thanks in advance

  6. […] jedoch auch nach intensiver Suche nicht mehr finden. Bei meiner Suche bin ich auf das Plugin von Adam Zwakk gestoßen. Sie können dieses Plugin direkt auf der Seite von Adam Zwakk oder hier herunterladen. […]

  7. I get an issue saying that my file is corrupted… says it’s not a unity 3d file… but it is… any idea why?

  8. Hello Adam,

    Thanks for the work. When I try the old plug-in I get an invalid data file error saying the file is not a unity web player file.

    When I use your plug-in the “Unity Web Player: Install Now!” banner gets embedded.

    Any ideas?


    • Semi-late reply, but does clicking on the install now player do anything?

      • I am having the same “Unity Web Player: Install Now!” banner problem.

        Clicking on the banner links you to the unity website to download the web player. But this does not help as it is already installed.

        Niels van Schooten (post higher up) seems to have his working now, but I’m at a loss.

        • I think I solved it!
          I was getting the same “Unity Web Player: Install Now!” banner after using Avidesk’s bugfix. My mistake was to just copy&paste the line of code, so it changed the formatting of the quotation marks. Changing the values manually did the trick. I hope this helps somebody!
          Btw thanks a lot for the plugin :)

  9. Why this plugin can not use the “altimage” tag when loading unity3D file?
    Could anybody can help me?Thanks..

  10. […] you would like to share the above player on your own WordPress blog, first download the player from this link. Then point it […]

  11. Hello! Thanks for creating this great plugin.

    I’ve got a problem on my site in which I have two different embedded Unity players in two different posts. If I navigate between the two different posts, the Unity content from one appears in the other, and vice-versa.

    So for instance I’ve got one with a streetscape: http://www.rockettreeart.com/foster-road-game-engine-redesign/ and one with a game character: http://www.rockettreeart.com/zbrush-wip-young-shepherdess/. Sometimes when I open the post about the streetscape, the character shows up in that post’s Unity player. And vice-versa.

    As a workaround I’ll probably just delete one of the players, so if you should check them out don’t be confused if you only see a Unity player in one of the posts.

    And BTW, one thing I tried was to rename “WP_UnityObject” to “WP_UnityObject2” thinking that renaming might help. But it didn’t. The player ran, but still showed the wrong content.

    Suggestions would be most appreciated!

  12. Hello!

    Thanks for the excellent plugin.

    Unfortunately I had a little trouble with it: when I post onto my portfolio site in which I want to show a couple of Unity3D players, sometimes the contents of the players gets swapped. For instance, I had one player (which I took down because of this problem) embedded in a post with a female game character, and the other in a post showing a streetscape. One the one in which I want to show the streetscape sometimes the character shows up, and on the character’s page, sometimes I see the streetscape in her player.

    Any suggestions as to how to handle this would be most welcome!

    I also had a bit of trouble posting to this blog: I attempted this post once before, and thought it showed up, but now I don’t see it. Hopefully this one works.



  13. Hey guys, just wanted to add to this discussion…

    If you can’t get Adam’s plugin to work, another alternative is to use the iFrame wordpress plugin. Basically, you just wrap the html file in a box using iframe and that embeds it in your post/page body.

    Here’s a link to the plugin: http://wordpress.org/plugins/iframe/
    Here’s an example of what it looks like on my website: http://charliehelman.com/octave-announcing-rocket-game/

    The syntax is very similar:
    [iframe src=”http://yourwebsite.com/yourUnityBuild.html” width=”550″ height=”640″]

    Hope this helps!

  14. Hey there! Quick question that’s completely off topic. Do you know how to make your site mobile friendly?
    My weblog looks weird when viewing from my iphone 4. I’m trying to find a template or plugin that might be able
    to resolve this issue. If you have any recommendations, please share.

    Thank you!

  15. Thank you! Still works after all these years! Implementing at: http://revealingcooperationandconflict.com/virtual-plasencia-version-1-0/