I began with Unity yesterday. I’ve created some games on Roblox, but I wanted something different, leading me to Unity. I tried following 2 microgame tutorials, and I can complete both of them up to the part where you build and publish. When attempting to build for WebGL, it will always get to this step and then just stop.
What should I do? I’m using 2018.4.18f1, the version required by the microgames. The Unity window name bar thing says I’m using DX11 on a DX9 GPU. Is a GTX 1660 supposed to show this? Is a GTX 1660 not capable of DX11 and somehow causing this error?
Edit: A few minutes after posting this it finally finished building. Is this step supposed to take >5 minutes?
Yes. Building binaries is a very processor intensive task. The IL2CPP stage, for example, has to compile every script into C# but then low level code generated by it is translated into C++ and compiled a second time. My development rig is a Ryzen 5 1600X with 32GB RAM and my record to date was a two hour build of a 100+ GB project into a 3 GB binary for Windows.
That said it won’t always take a long time to make a build. Unity caches the majority of the build process so when you make future builds for the same platform it will try to use cached copies of the files involved speeding up the build process. That two hours I mentioned earlier becomes five to ten minutes with additional builds.
The native binary with IL2CPP step can be long. It is impacted by CPU and disk performance as well. As already mentioned, when building an IL2CPP binary it is compiling C# to IL, converting IL to C++, then compiling C++ to machine code. I wouldn’t be surprised if a lot of the process was single threaded.
As for DX11 on DX9 GPU, it will say that when the target platform doesn’t support a DX11 equivalent. You could try switching your platform in build settings to Windows Standalone and see if it reports straight DX11 to see if that is the specific reason here (sorry I haven’t done WebGL in a while and don’t remember for sure).