Hello.
How can I use this script to load Unity WebGL, and how can I upload the files on the weweb server?
thanks
<script src="WeWebServer/WebGL.loader.js"></script>
<script>
var buildUrl = "weweb/Unity_WebGL/Build]";
var config = {
dataUrl: buildUrl + "/Unity_WebGL.data",
frameworkUrl: buildUrl + "/Unity_WebGL.framework.js",
codeUrl: buildUrl + "/Unity_WebGL.wasm",
};
createUnityInstance(document.querySelector("#unity-canvas"), config)
.then((unityInstance) => {
// Unity instance is ready.
}).catch((error) => {
// Handle loading error.
console.error("Unity Instance loading failed:", error);
});
</script>