Search Unity

Question WebXR UnityModule is not defined

Discussion in 'VR' started by iwellsSI, Feb 2, 2021.

  1. iwellsSI

    iwellsSI

    Joined:
    Jan 14, 2014
    Posts:
    7
    Hello,

    I wonder if anyone can help me with a problem involving viewing published WebXR content. Everytime I build my VR project I can view it with a local server no problem and switch to VR but when I push it to a Github page it will get to about ~90% loading then throw an exception.

    "SyntaxError: unexpected token: identifier"

    Uncaught ReferenceError: UnityModule is not defined
    processWasmFrameworkJob https://spearheadinteractive.github.io/MRIWebVRDemo/Build/UnityLoader.js:4
    onload https://spearheadinteractive.github.io/MRIWebVRDemo/Build/UnityLoader.js:4
    UnityLoader.js:4:3830
    processWasmFrameworkJob https://spearheadinteractive.github.io/MRIWebVRDemo/Build/UnityLoader.js:4
    onload https://spearheadinteractive.github.io/MRIWebVRDemo/Build/UnityLoader.js:4

    I am using the Mozilla WebXR Exporter from the asset store in Unity 2019.4.18f1.

    Solutions tried:
    • Disabling the compression format
    • Switching the compression format from Gzip to Brotli
    • Building with Development Build
    • Created a web.config file for each compression format and ran with and without the .config file.
    • Used a custom version of the WebXR Exporter plugin
    • Browsers; Firefox/Chrome/Chromium/Edge
    Does anyone have any ideas what the solution could be, please?
     
  2. MisterMan123

    MisterMan123

    Joined:
    Jan 6, 2018
    Posts:
    5