Skip to content

Commit

Permalink
update: archer
Browse files Browse the repository at this point in the history
  • Loading branch information
lordbenedikt committed Jul 13, 2024
1 parent 0f67905 commit c1ac51e
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 20 deletions.
Binary file added Build/web_build_2024_0714.data.gz
Binary file not shown.
Binary file added Build/web_build_2024_0714.framework.js.gz
Binary file not shown.
1 change: 1 addition & 0 deletions Build/web_build_2024_0714.loader.js

Large diffs are not rendered by default.

Binary file added Build/web_build_2024_0714.wasm.gz
Binary file not shown.
Binary file added TemplateData/MemoryProfiler.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions TemplateData/style.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
body { padding: 0; margin: 0 }
#unity-container { position: absolute }
#unity-container.unity-desktop { left: 50%; top: 50%; transform: translate(-50%, -50%) }
#unity-container.unity-mobile { width: 100%; height: 100% }
#unity-container.unity-mobile { position: fixed; width: 100%; height: 100% }
#unity-canvas { background: #231F20 }
.unity-mobile #unity-canvas { width: 100%; height: 100% }
#unity-loading-bar { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: none }
Expand All @@ -12,5 +12,5 @@ body { padding: 0; margin: 0 }
.unity-mobile #unity-footer { display: none }
#unity-webgl-logo { float:left; width: 204px; height: 38px; background: url('webgl-logo.png') no-repeat center }
#unity-build-title { float: right; margin-right: 10px; line-height: 38px; font-family: arial; font-size: 18px }
#unity-fullscreen-button { float: right; width: 38px; height: 38px; background: url('fullscreen-button.png') no-repeat center }
#unity-fullscreen-button { cursor:pointer; float: right; width: 38px; height: 38px; background: url('fullscreen-button.png') no-repeat center }
#unity-warning { position: absolute; left: 50%; top: 5%; transform: translate(-50%); background: white; padding: 10px; display: none }
Binary file added TemplateData/webmemd-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 19 additions & 18 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</head>
<body>
<div id="unity-container" class="unity-desktop">
<canvas id="unity-canvas" width=960 height=600></canvas>
<canvas id="unity-canvas" width=960 height=600 tabindex="-1"></canvas>
<div id="unity-loading-bar">
<div id="unity-logo"></div>
<div id="unity-progress-bar-empty">
Expand All @@ -24,6 +24,7 @@
</div>
</div>
<script>

var container = document.querySelector("#unity-container");
var canvas = document.querySelector("#unity-canvas");
var loadingBar = document.querySelector("#unity-loading-bar");
Expand Down Expand Up @@ -56,19 +57,19 @@
}

var buildUrl = "Build";
var loaderUrl = buildUrl + "/dungeon_game_webgl_etc.loader.js";
var loaderUrl = buildUrl + "/web_build_2024_0714.loader.js";
var config = {
dataUrl: buildUrl + "/dungeon_game_webgl_etc.data.unityweb",
frameworkUrl: buildUrl + "/dungeon_game_webgl_etc.framework.js.unityweb",
codeUrl: buildUrl + "/dungeon_game_webgl_etc.wasm.unityweb",
dataUrl: buildUrl + "/web_build_2024_0714.data.gz",
frameworkUrl: buildUrl + "/web_build_2024_0714.framework.js.gz",
codeUrl: buildUrl + "/web_build_2024_0714.wasm.gz",
streamingAssetsUrl: "StreamingAssets",
companyName: "DefaultCompany",
productName: "Dungeon_Game",
productVersion: "0.1",
showBanner: unityShowBanner,
};

// By default Unity keeps WebGL canvas render target size matched with
// By default, Unity keeps WebGL canvas render target size matched with
// the DOM size of the canvas element (scaled by window.devicePixelRatio)
// Set this to false if you want to decouple this synchronization from
// happening inside the engine, and you would instead like to size up
Expand All @@ -83,15 +84,13 @@
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);
container.className = "unity-mobile";
canvas.className = "unity-mobile";

// To lower canvas resolution on mobile devices to gain some
// performance, uncomment the following line:
// config.devicePixelRatio = 1;

canvas.style.width = window.innerWidth + 'px';
canvas.style.height = window.innerHeight + 'px';

unityShowBanner('WebGL builds are not supported on mobile devices.');
} else {
// Desktop style: Render the game canvas in a window that can be maximized to fullscreen:

Expand All @@ -106,16 +105,18 @@
script.onload = () => {
createUnityInstance(canvas, config, (progress) => {
progressBarFull.style.width = 100 * progress + "%";
}).then((unityInstance) => {
loadingBar.style.display = "none";
fullscreenButton.onclick = () => {
unityInstance.SetFullscreen(1);
};
}).catch((message) => {
alert(message);
});
};
}).then((unityInstance) => {
loadingBar.style.display = "none";
fullscreenButton.onclick = () => {
unityInstance.SetFullscreen(1);
};
}).catch((message) => {
alert(message);
});
};

document.body.appendChild(script);

</script>
</body>
</html>

0 comments on commit c1ac51e

Please sign in to comment.