From 1b23a1303179505d875feb19552849c20ec8d183 Mon Sep 17 00:00:00 2001 From: Katboi01 Date: Mon, 9 Oct 2023 00:37:29 +0200 Subject: [PATCH] updated webgl template --- .gitignore | 1 + Assets/WebGLTemplates/Better2020/index.html | 3 ++- debug.log | 8 -------- 3 files changed, 3 insertions(+), 9 deletions(-) delete mode 100644 debug.log diff --git a/.gitignore b/.gitignore index 58cbc82..6f1eace 100644 --- a/.gitignore +++ b/.gitignore @@ -70,3 +70,4 @@ crashlytics-build.properties # Temporary auto-generated Android Assets /[Aa]ssets/[Ss]treamingAssets/aa.meta /[Aa]ssets/[Ss]treamingAssets/aa/* +/debug.log diff --git a/Assets/WebGLTemplates/Better2020/index.html b/Assets/WebGLTemplates/Better2020/index.html index 0950a3c..6e48967 100644 --- a/Assets/WebGLTemplates/Better2020/index.html +++ b/Assets/WebGLTemplates/Better2020/index.html @@ -67,7 +67,6 @@ if (/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)) { container.className = "unity-mobile"; - config.devicePixelRatio = 1; } #if BACKGROUND_FILENAME canvas.style.background = "url('" + buildUrl + "/{{{ BACKGROUND_FILENAME.replace(/'/g, '%27') }}}') center / cover"; @@ -75,6 +74,7 @@ loadingCover.style.display = ""; const script = document.createElement("script"); + var jsUnityInstance = null; script.src = loaderUrl; script.onload = () => { createUnityInstance(canvas, config, (progress) => { @@ -82,6 +82,7 @@ progressBarEmpty.style.display = ""; progressBarFull.style.width = `${100 * progress}%`; }).then((unityInstance) => { + jsUnityInstance = unityInstance; loadingCover.style.display = "none"; if (canFullscreen) { if (!hideFullScreenButton) { diff --git a/debug.log b/debug.log deleted file mode 100644 index cec9c0a..0000000 --- a/debug.log +++ /dev/null @@ -1,8 +0,0 @@ -[1008/232855.814:ERROR:check.cc(298)] Check failed: false. NOTREACHED log messages are omitted in official builds. Sorry! -[1008/232950.806:ERROR:check.cc(298)] Check failed: false. NOTREACHED log messages are omitted in official builds. Sorry! -[1008/234001.769:ERROR:check.cc(298)] Check failed: false. NOTREACHED log messages are omitted in official builds. Sorry! -[1009/000128.951:ERROR:check.cc(298)] Check failed: false. NOTREACHED log messages are omitted in official builds. Sorry! -[1009/000221.301:ERROR:check.cc(298)] Check failed: false. NOTREACHED log messages are omitted in official builds. Sorry! -[1009/001613.314:ERROR:check.cc(298)] Check failed: false. NOTREACHED log messages are omitted in official builds. Sorry! -[1009/002215.248:ERROR:check.cc(298)] Check failed: false. NOTREACHED log messages are omitted in official builds. Sorry! -[1009/002732.252:ERROR:check.cc(298)] Check failed: false. NOTREACHED log messages are omitted in official builds. Sorry!