-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
60917b5
commit 97adc7b
Showing
5 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<!DOCTYPE html> | ||
<html lang="en-us"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | ||
<title>Unity WebGL Player | xxx</title> | ||
</head> | ||
<body style="text-align: center; padding: 0; border: 0; margin: 0;"> | ||
<canvas id="unity-canvas" width=640 height=960 style="width: 640px; height: 960px; background: #231F20"></canvas> | ||
<script src="Build/game.loader.js"></script> | ||
<script> | ||
if (/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)) { | ||
// Mobile device style: fill the whole browser client area with the game canvas: | ||
var meta = document.createElement('meta'); | ||
meta.name = 'viewport'; | ||
meta.content = 'width=device-width, height=device-height, initial-scale=1.0, user-scalable=no, shrink-to-fit=yes'; | ||
document.getElementsByTagName('head')[0].appendChild(meta); | ||
|
||
var canvas = document.querySelector("#unity-canvas"); | ||
canvas.style.width = "100%"; | ||
canvas.style.height = "100%"; | ||
canvas.style.position = "fixed"; | ||
|
||
document.body.style.textAlign = "left"; | ||
} | ||
|
||
createUnityInstance(document.querySelector("#unity-canvas"), { | ||
dataUrl: "Build/game.data.unityweb", | ||
frameworkUrl: "Build/game.framework.js.unityweb", | ||
codeUrl: "Build/game.wasm.unityweb", | ||
streamingAssetsUrl: "StreamingAssets", | ||
companyName: "DefaultCompany", | ||
productName: "xxx", | ||
productVersion: "1.0", | ||
// matchWebGLToCanvasSize: false, // Uncomment this to separately control WebGL canvas render size and DOM element size. | ||
// devicePixelRatio: 1, // Uncomment this to override low DPI rendering on high DPI displays. | ||
}); | ||
</script> | ||
</body> | ||
</html> |