Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Unity project with Vuforia included fails WebGL builds

Discussion in 'Vuforia' started by jason-vreps, Jul 12, 2019.

  1. jason-vreps

    jason-vreps

    Joined:
    Sep 22, 2017
    Posts:
    6
    First off, to address this from the get-go, I am aware that Vuforia does not support WebGL builds. We are not trying to build Vuforia into a WebGL build. The issue lies in trying to remove Vuforia from our project so that WebGL can build.

    We have a single project that ships 3 platforms: Android, iOS, and WebGL. Our Android and iOS projects have a new AR feature that we added recently, powered by Vuforia. Our whole pipeline works flawlessly here: Unity cloud build auto-builds from our project repo, and produces our Android and iOS builds. However, the WebGL build runs into a whole suite of errors due to its attempt to compile the
    VuforiaScripts.dll
    .

    Specifically:
    138: [Unity] -----CompilerOutput:-stdout--exitcode: 1--compilationhadfailure: True--outfile: Temp/VuforiaScripts.dll


    We use a pre-export script to remove all references to the Vuforia library, and remove all game objects in build-scenes that have any scripts referencing the Vuforia library. I have carefully lined all our scripts with
    #if !UNITY_WEBGL
    on the portions that relate to AR and Vuforia. Yet still, cloud build continues to attempt to compile the
    VuforiaScripts.dll
    .

    Is there something I'm missing for telling the build process to ignore Vuforia libraries?

    Using Unity 2018.3.14f1.
    Vuforia v8.1.7
     
  2. meedabit

    meedabit

    Official Vuforia Employee Vuforia

    Joined:
    Dec 8, 2016
    Posts:
    253
    Hello,

    I've raised this issue to our dev team to see if they have any feedback. I'll respond to this thread if I have any information to provide.

    Thanks,
    Vuforia Engine Support
     
  3. ptc-pmessenger

    ptc-pmessenger

    Joined:
    Jan 17, 2017
    Posts:
    2
    You'd also have to remove the entire Vuforia folder from the project (this contains scripts) as well as the Vuforia related files from the Editor folder. You may as well also remove Vuforia related files (datasets, models) from StreamingAssets and Resources while you're at it.
     
    meedabit likes this.