- Home /
Post my game on the Blog
Hi I have my game build for WebPlayer, now I want it to be displayed on my blog. I tried using Gayasoft gadget but it didn't work for me. Then i tried taking the source code from the player and pasting as a HTML, and it also didn't work. Does anyone has another way to this.
Felipe
I think you just upload it like a normal file and it works...
Answer by dineshrajpurohit · Jun 20, 2012 at 03:24 AM
You will need to save your "WebPlayer.unity3d" in the same folder where your blog page will be and embed the file in to your blog post and use javascript function to call it. Here is the code.
Your div tag where you will see the unity game.
And the Javascript functions
<script type="text/javascript" src="http://webplayer.unity3d.com/download_webplayer-3.x/3.0/uo/UnityObject.js"></script>
<script type="text/javascript">
<!--
function GetUnity() {
if (typeof unityObject != "undefined") {
return unityObject.getObjectById("unityPlayer");
}
return null;
}
if (typeof unityObject != "undefined") {
unityObject.embedUnity("unityPlayer", "WebPlayer.unity3d", 600, 450);
}
-->
</script>
I hope this is what you were looking for.
Dins
So how can I have my both files onto same folder location on my blog? Do you post the unity file somewhere on the blog and then you add a gadget that opens it - right?
It depends. how much control do you have to your blog?. Can you access the blog files using ftp, ssh or something. If you can access the files physically than this can be done. If you have a blog which you can only manipulate by using login system. Than it will be difficult. You can create a page on your domain (if you have one) and put the link on the blog.
Your answer
![](https://koobas.hobune.stream/wayback/20220613072954im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Is there a workaround to display Ad Network video content triggered by Unity? 0 Answers
Remove Unity Web Player Install now Icon 1 Answer
How to execute SendMessage when the Web Player is in an object DOM? 1 Answer
Web Player splash screen BEFORE loading 0 Answers
Unity Web Player telling me to install. Suddenly. NEED HELP FAST! 0 Answers