- Home /
Web player
I built a game and I need to upload it to www.webs.com. I have my own free site and I would like to put my game up there. I built the game as a web player and I don't know how to upload it to the site. Please respond!
Answer by fafase · Jan 02, 2013 at 07:53 PM
When you build your web game you get two files, the data with a .unity3d and a simple html file.
One thing first
YOU HAVE TO HAVE THE TWO FILES IN THE SAME FOLDER OF YOUR WEBSITE.
There is not much you can do with the .unity3d file.
If you open the html file in an editor, you will see some Javascript (the real one not the unity one) script function. Those are doing it all.
unityObject.embedUnity("unityPlayer", "Game.unity3d", 800, 600);
This says to find the div unityPlayer id in your html, find the game.unity3d data file stored in the same folder, 800 and 600 are size parameters.
You can also add optional parameters after.
Now in your body you need:
<div id="unityPlayer" class="player">
<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>
This is the div with id unityPlayer.
You do not place anything in the div. $$anonymous$$y exemple line above has a div inside a div in case your computer does not have the web player installed so that it shows a download link. This is by default on your html file.
All you need is to have a div with id matching the id name you provide in the function, in my case unityPlayer, somewhere in your html. The javascript function will find it and embed the game inside of it using the web player.
All in all, you pretty much have nothing to do.
Would I put your
<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>
or another code into the box. It says HT$$anonymous$$L code. How would I get that to show my game?
Sorry I was using Opera and the browser didn't load. so it's fixed now!! $$anonymous$$y site is up and running.