vue3 vite web u3d 打包成app后的缓存问题
u3d打包后有一个build文件,放到服务器上通过http下载。打包app后,每次打开app都会重新去下载。怎么把文件存到手机里。
var buildUrl = "http://xxxxxxx/Build";
var loaderUrl = buildUrl + "/Brush.loader.js";
var config = {
dataUrl: buildUrl + "/Brush.data",
frameworkUrl: buildUrl + "/Brush.framework.js",
codeUrl: buildUrl + "/Brush.wasm",
streamingAssetsUrl: "StreamingAssets",
companyName: "DefaultCompany",
productName: "111",
productVersion: "0.1",
showBanner: unityShowBanner,
}
var script = document.createElement("script");
script.src = loaderUrl;
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);
});
};
document.body.appendChild(script);