I just set up a blog for myself last night and I installed the Unity WP plugin that HiggyB made. The issue I’m running into is that when I embed my unity file into a post, a space shows where the game window should be but nothing loads. I’ve tried relative and absolute paths:
Comparing it to what you have, maybe you just need to specify the width and height (I think I also had trouble when I didn’t specify an altimate). Once you have it running, one thing to keep in mind is that, last time I checked, it uses global SESSION variables in PHP so it supports only one use of this tag on a Wordpress page. If you have two blog postings showing on a page each with the Unity tag, they will both show the same .unity3d file based on the last WP_UnityObject tag that was read.
Still no dice. The current post reflects the latest tags. Well it looks like it’s some compatibility issue and I’m not sure how to debug it. I didn’t realize there was a restriction of one instance per page. Even then I thought it would have been slick to include it inline with my posts.
I don’t recall having any limitations about one content piece per page in particular but I could easily just be forgetting something. In any case I’ll give this all a look, although a bit later as I’m crammed with work at the moment. I thought I’d at least poke my head up and make sure you knew I saw this thread and your blog comments post. I’ll be back…
If you look at the above to posts individually, the look fine and different, but if you go to http://www.fugutalk.com/ to see both on the same page, you’ll see the same one (the second one loaded) in both players.
HiggyB, thanks for touching on the thread. I appreciate it.
technicat, that’s a brilliant test. Ok so it works on your blog. So it has to be my set up. Which version of WordPress are you using? I’m using 2.8.4
I installed according to the ReadMe file but just to double check I didn’t do anything stupid, here’s an image of my file structure after uploading the plug-in.
http://www.internetspacepimp.com points to /isp_blog since I’m hosting several domains on my host. It pointed to that directory when I installed Wordpress already so I have no issue there. After I uploaded I went to plug-ins and activated WP_UnityObject and that screen looks like this now:
I’m assuming it’s one of two things, either I installed and activated it incorrectly or the current version of Wordpress is causing an issue.
You have the same wordpress and plugin versions I do, and the files look like I remember them, but if I do a View Source from the browser on your blog post and click on the .php files, eventually I get to a WP_Content.php file which seems to expand to nothing, whereas when I do the same on one of my posts, it expands to a reference of a javascript file.
My install was quite a while ago, but I seem to remember seeing all the PHP work is done by the top-level WP_UnityObject.php file which sets up the player parameters in session variables and the WP_Content.php which is under the php subdirectory and actually uses those variables for the final expansion. You might want to just recopy those files over and make sure you have everything under the js and php subdirectories of the plugin, and it’s worth taking a browse through the files (it’s a good way to learn PHP!)
Ok, I deactivated and deleted the files and re-downloaded the plug-in from the resources page, uploaded it and then re-enabled it. Still no go so I’m assuming something is broken in the installation or in the set up of my site. I see what you’re talking about in looking at the page source. I’m going to investigate a little but I’m not familiar with php.
I see from a freshly downloaded copy from the the Unity web site, in WP_UnityObject.php where the iframe tag is output and the the name and id variables default to “Unity”. If that’s what you see, too, I don’t know what’s going on.
Well it still doesn’t work and I’m sure it’s something simple that I don’t understand but I’ve spent quite a bit of time on it already. I’ve searched for solutions but all I found were a few posts claiming the same problems I’m having. Although I did find alternate solutions and if I have time tonight I may try them out.
Well done Tom. I just installed this plugin and was up and running with my embedded game in wordpress in under 10 minutes. This is very straight-forward and easy to use. Thank you!
I am working on revamping a year old Unity project and built a blog to allow for easy online promotion of the game development. You can see it at: Tactics Game Online.
Hey guys,
Just installed a clean version of Wordpress 3.0 on my website, installed the unity3d plugin and ran into what sounds like the same problem Hyjinx and Saihtam had. So after adding a few echo’s to the code I realised that I had accidentally added a couple of double spaces in between the variables for the WP_UnityObject in my post. At the moment this isn’t handled by the plugin and for me it just caused an oddly shaped div to appear containing the altimage (if I specified one). After some testing I came up with the following solution:
Edit the block at WP_Unity/WP_UnityObject.php:61 as follows: