Loading a Unity WebGL game inside a container

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>

More specifically, I apparently can’t upload the wasm and data files.

Hi, I think we restricted file extensions in order to protect users from malicious usage of this feature, could you open a ticket on support.weweb.io with your case ? We will try to handle it :slight_smile: