Search Unity

Bug Getting Errors when trying to build to WebGL

Discussion in 'Editor & General Support' started by DylanDev_, Sep 11, 2022.

  1. DylanDev_

    DylanDev_

    Joined:
    Sep 11, 2020
    Posts:
    8
    When trying to build to WebGL I get these series of errors:

    Does anyone know a fix?
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,745
    Unless someone here chimes in saying they recognize the above, or unless the above returns you hits in google (it probably will; whether they will be useful is another thing), here's how to troubleshoot:

    First, make a blank project with a single blank scene and prove that it builds successfully.

    If it does NOT build, then go fix your Unity installation, or your other tools.

    Until you can build a blank project to the target platform, don't fiddle with anything else.

    Once you can build a blank project, now bisect the problem by bringing over parts of your current project and building it one subsystem at a time, perhaps stubbing things out that might trigger compiler errors.

    Most often things that prevent building are third-party libraries such as Firebase.

    Once you identify the subsystem, go to the documentation for it and make sure you are doing it correctly.

    It may also be helpful to work through a tutorial or two for that subsystem.