When I try to run my Unity project with WebGL building on localserver IIS or Tomcat, it gets stuck like this:
(the loading page is open successfully, but progress bar does not move)
I have already added the config file for IIS, and there is no error when the browser (both Firefox and Chrome) open the index. It seems that the loading pages opened in browser are the same with and without localhost web server.
In some situations the loading can succeed:
1.directly choose "Build and Run" in Unity Engine, and the web page can successfully run the game.
2.once the building process failed with an error(a file cannot be deleted). I tried the semi-finished building project in the Temp folder of project root, and it successfully worked. But later I copied that folder to another place, it stuck on loading page again.
the Unity version is 2020.
How can I solve the problem?