Skip to content

Commit 607c354

Browse files
committed
chore: use unity global var instead of hardcoded
1 parent b858bca commit 607c354

24 files changed

+15
-607
lines changed

src/Packages/Passport/Samples~/sample/Assets/WebGLTemplates/unity-webview/callback.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="utf-8">
55
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6-
<title>Unity WebGL Player | Immutable SDK Sample App</title>
6+
<title>Unity WebGL Player | {{{ PRODUCT_NAME }}}</title>
77
<link rel="shortcut icon" href="TemplateData/favicon.ico">
88
<link rel="stylesheet" href="TemplateData/style.css">
99
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>

src/Packages/Passport/Samples~/sample/Assets/WebGLTemplates/unity-webview/index.html

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="utf-8">
55
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6-
<title>Unity WebGL Player | Immutable SDK Sample App</title>
6+
<title>Unity WebGL Player | {{{ PRODUCT_NAME }}}</title>
77
<link rel="shortcut icon" href="TemplateData/favicon.ico">
88
<link rel="stylesheet" href="TemplateData/style.css">
99
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
@@ -21,36 +21,36 @@
2121
<div id="unity-footer">
2222
<div id="unity-webgl-logo"></div>
2323
<div id="unity-fullscreen-button"></div>
24-
<div id="unity-build-title">Immutable SDK Sample App</div>
24+
<div id="unity-build-title">{{{ PRODUCT_NAME }}}</div>
2525
</div>
2626
</div>
2727
<script>
2828
var buildUrl = "Build";
29-
var loaderUrl = buildUrl + "/webgl.loader.js";
29+
var loaderUrl = buildUrl + "/{{{ LOADER_FILENAME }}}";
3030
var config = {
31-
dataUrl: buildUrl + "/webgl.data",
32-
frameworkUrl: buildUrl + "/webgl.framework.js",
33-
codeUrl: buildUrl + "/webgl.wasm",
31+
dataUrl: buildUrl + "/{{{ DATA_FILENAME }}}",
32+
frameworkUrl: buildUrl + "/{{{ FRAMEWORK_FILENAME }}}",
33+
codeUrl: buildUrl + "/{{{ CODE_FILENAME }}}",
3434
streamingAssetsUrl: "StreamingAssets",
35-
companyName: "Immutable",
36-
productName: "Immutable SDK Sample App",
37-
productVersion: "0.1.0",
35+
companyName: "{{{ COMPANY_NAME }}}",
36+
productName: "{{{ PRODUCT_NAME }}}",
37+
productVersion: "{{{ PRODUCT_VERSION }}}",
3838
};
3939

4040
var container = document.querySelector("#unity-container");
4141
var canvas = document.querySelector("#unity-canvas");
4242
var loadingBar = document.querySelector("#unity-loading-bar");
4343
var progressBarFull = document.querySelector("#unity-progress-bar-full");
4444
var fullscreenButton = document.querySelector("#unity-fullscreen-button");
45-
var width0 = "960px";
46-
var height0 = "600px";
45+
var width0 = "{{{ WIDTH }}}px";
46+
var height0 = "{{{ HEIGHT }}}px";
4747

4848
if (/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)) {
4949
container.className = "unity-mobile";
5050
config.devicePixelRatio = 1;
5151
} else {
52-
canvas.style.width = "960px";
53-
canvas.style.height = "600px";
52+
canvas.style.width = "{{{ WIDTH }}}px";
53+
canvas.style.height = "{{{ HEIGHT }}}px";
5454
}
5555
loadingBar.style.display = "block";
5656

src/Packages/Passport/Samples~/sample/Assets/WebGLTemplates/unity-webview/logout.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="utf-8">
55
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6-
<title>Unity WebGL Player | Immutable SDK Sample App</title>
6+
<title>Unity WebGL Player | {{{ PRODUCT_NAME }}}</title>
77
<link rel="shortcut icon" href="TemplateData/favicon.ico">
88
<link rel="stylesheet" href="TemplateData/style.css">
99
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
Binary file not shown.

src/Packages/Passport/Samples~/sample/webgl/Build/webgl.framework.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/Packages/Passport/Samples~/sample/webgl/Build/webgl.loader.js

Lines changed: 0 additions & 1 deletion
This file was deleted.
Binary file not shown.

src/Packages/Passport/Samples~/sample/webgl/Passport/index.html

Lines changed: 0 additions & 351 deletions
This file was deleted.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)