- Home /
Best Answer
Answer by fireDude67 · Nov 27, 2010 at 02:10 AM
Do you mean, how to launch the game in a new window?
If you do, here is how I would do it:
<html>
<head>
<title>Window to launch Unity Game</title>
<script type="text/javascript">
function OpenWindowWithUnityContent() {
window.open("PathNameToFileWithUnityContent.html", "Unity Game", "scrollbars=false");
}
</script>
</head>
<body>
<h1 style="text-align=center">unity Game</h1>
<a href="javascript:void(0)" onclick="OpenWindowWithUnityContent()">Open Unity Game</a>
</body>
</html>
Things you will need to change in the window.open()
function:
"PathNameToFileWithUnityContent.html"
is the HTML file with just the unity game in it"Unity Game"
is the title of the page- If you want, change
scrollbars=false
toscrollbars=true
if you want scroll bars