Skip to content

Commit b598fe0

Browse files
committed
init:basic-ui
0 parents  commit b598fe0

18 files changed

Lines changed: 168 additions & 0 deletions

Build/New folder.data.br

4.14 MB
Binary file not shown.

Build/New folder.framework.js.br

76.2 KB
Binary file not shown.

Build/New folder.loader.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Build/New folder.wasm.br

8.05 MB
Binary file not shown.

ServiceWorker.js

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
const cacheName = "DefaultCompany-Sample Base Unity SDK-1.0";
2+
const contentToCache = [
3+
"Build/New folder.loader.js",
4+
"Build/New folder.framework.js.br",
5+
"Build/New folder.data.br",
6+
"Build/New folder.wasm.br",
7+
"TemplateData/style.css"
8+
9+
];
10+
11+
self.addEventListener('install', function (e) {
12+
console.log('[Service Worker] Install');
13+
14+
e.waitUntil((async function () {
15+
const cache = await caches.open(cacheName);
16+
console.log('[Service Worker] Caching all: app shell and content');
17+
await cache.addAll(contentToCache);
18+
})());
19+
});
20+
21+
self.addEventListener('fetch', function (e) {
22+
e.respondWith((async function () {
23+
let response = await caches.match(e.request);
24+
console.log(`[Service Worker] Fetching resource: ${e.request.url}`);
25+
if (response) { return response; }
26+
27+
response = await fetch(e.request);
28+
const cache = await caches.open(cacheName);
29+
console.log(`[Service Worker] Caching new resource: ${e.request.url}`);
30+
cache.put(e.request, response.clone());
31+
return response;
32+
})());
33+
});

TemplateData/favicon.ico

2.25 KB
Binary file not shown.
5.48 KB
Loading
5.46 KB
Loading
96 Bytes
Loading
109 Bytes
Loading

0 commit comments

Comments
 (0)