Hi friends…
I have finished a game
and I want to into my wordpress blog:(, what should I do? ![]()
Like this:
Thanks…
Hi friends…
I have finished a game
and I want to into my wordpress blog:(, what should I do? ![]()
Like this:
Thanks…
No one can help me?:shock::shock:
:neutral: no man,can help me?
Exporting for flash player or Unity Webplayer? I dont know wordpress well, but maybe you can put in a blank html page inside wordpress, I know this works with eg typo3, and then put in the code of your unity web html
Thanks… Exporting for Unity Webplayer…and I want into the article page…
How exactly dont you manage to do this already? It should simply be a matter of uploading the webplayer unity built and referencing it’s html…
I’m not even remotely interested in investigating wordpress any further, my rude opinion is that you shouldn’t use blog tools for non-blog goals.
So why wouldnt blogging about the game and having an url to the webplayer work better?
EDIT:
Ok, curiosity showed me that you can also edit plain html in WordPress, so just copying the html tags that would normally add the player to the page should be sufficient.
I have finished
That’s one (though a horrid solution).
If you’d go to your lamborghini demo page ( http://unity.cgtip.cn/UnityWebPlayer/Lamboghini/Lamboghini.html ) and open it’s source, it’s the world’s best cheat-sheet ever!
Even though it seems you’re infamiliar with HTML in general, try to refrain from using workarounds like these, for they can always produce problems you otherwise wouldnt have had to face.
If you look at the source code of the webplayer page, you’ll see this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Unity Web Player | Lamboghini</title>
<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'></script>
<script type="text/javascript">
<!--
var unityObjectUrl = "http://webplayer.unity3d.com/download_webplayer-3.x/3.0/uo/UnityObject2.js";
if (document.location.protocol == 'https:')
unityObjectUrl = unityObjectUrl.replace("http://", "https://ssl-");
document.write('<script type="text\/javascript" src="' + unityObjectUrl + '"><\/script>');
-->
</script>
<script type="text/javascript">
<!--
var config = {
width: 960,
height: 600,
params: { enableDebugging:"0" }
};
var u = new UnityObject2(config);
jQuery(function() {
var $missingScreen = jQuery("#unityPlayer").find(".missing");
var $brokenScreen = jQuery("#unityPlayer").find(".broken");
$missingScreen.hide();
$brokenScreen.hide();
u.observeProgress(function (progress) {
switch(progress.pluginStatus) {
case "broken":
$brokenScreen.find("a").click(function (e) {
e.stopPropagation();
e.preventDefault();
u.installPlugin();
return false;
});
$brokenScreen.show();
break;
case "missing":
$missingScreen.find("a").click(function (e) {
e.stopPropagation();
e.preventDefault();
u.installPlugin();
return false;
});
$missingScreen.show();
break;
case "installed":
$missingScreen.remove();
break;
case "first":
break;
}
});
u.initPlugin(jQuery("#unityPlayer")[0], "Lamboghini.unity3d");
});
-->
</script>
<style type="text/css">
<!--
body {
font-family: Helvetica, Verdana, Arial, sans-serif;
background-color: black;
color: white;
text-align: center;
}
a:link, a:visited {
color: #bfbfbf;
}
a:active, a:hover {
color: #bfbfbf;
}
p.header {
font-size: small;
}
p.header span {
font-weight: bold;
}
p.footer {
font-size: x-small;
}
div.content {
margin: auto;
width: 960px;
}
div.broken,
div.missing {
margin: auto;
position: relative;
top: 50%;
width: 193px;
}
div.broken a,
div.missing a {
height: 63px;
position: relative;
top: -31px;
}
div.broken img,
div.missing img {
border-width: 0px;
}
div.broken {
display: none;
}
div#unityPlayer {
cursor: default;
height: 600px;
width: 960px;
}
-->
</style>
</head>
<body>
<p class="header"><span>Unity Web Player | </span>Lamboghini</p>
<div class="content">
<div id="unityPlayer">
<div class="missing">
<a href="http://unity3d.com/webplayer/" title="Unity Web Player. Install now!">
<img alt="Unity Web Player. Install now!" src="http://webplayer.unity3d.com/installation/getunity.png" width="193" height="63" />
</a>
</div>
</div>
</div>
<p class="footer">« created with <a href="http://unity3d.com/unity/" title="Go to unity3d.com">Unity</a> »</p>
</body>
</html>
In this specific case, if you’d go to the HTML editor of WordPress, you’d just have to copy-paste lines 6 through 62 within the and tags of that page. And a smaller set for the text that would appear if unity is not installed, lines
119 through 129 should be inserted where you’d want the player to actually display.
Then just insert the following right after the script you’ve already copy-pasted (from lines 6-62) :
<style type="text/css">
<!--
div.broken { display: none; }
div#unityplayer {
cursor: default;
height: 600px;
width: 960px;
}
-->
</style>
(And ofcourse, if needed, change the resolution parameters accordingly on lines 5, 26 and 27)
Why i’m advising this method?
iFrames are horrid web elements, the downside would mostly come forward in this case if you’d try to add a second demo.
Looking at the code, you’d see the “div” is called unityplayer.
Adding a second player’s scripts would cause the second player to overwrite whichever container of unityplayer it found first (so not necessarily the correct one)
next to the fact that iframes generally mess up whatever page-layout they’re in (unless you know exactly what you’re doing, which im just guessing you dont
)
There may still be some pitfalls you’d likely not be able to fix yourself if you encounter them if i wouldn’t mention them though, so i’ll just sum up a few things to keep in mind:
If in any case the formatting looks wrong when the player isn’t installed, the following text is probably missing before the “div.broken” part you copied;
div.content {
margin: auto;
width: 960px;
}
div.broken, div.missing {
margin: auto;
position: relative;
top:50%;
width:193px;
}
div.broken a,
div.missing a {
height: 63px;
position: relative;
top: -31px;
}
div.broken img, div.missing img
{
border-width: 0px;
}
though i hoped it could be left out, as most of it seems like unneccesary formatting to me.
Hope this’ll help you out a little more.
oh, u are superman,thank you very much,…