How to change the URL of the Unity WebGL build? The build settings do not have any setting to change the URL or the port number. However here are my findings.
The following path contains the build tools for WebGL
Unity\Hub\Editor\2019.4.9f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools
And these are the build-tools for WebGL
Brotli/
data/
Demangle.js
DynamicJslibLoader.js
Emscripten/
emscripten.config
Emscripten_FastComp_Win/
Emscripten_Win/
ExceptionLogger.js
lib/
prejs/
SimpleWebServer.exe*
SimpleWebServer.pdb
uglify-js/
UnityLoader.js
UnityLoader.min.js
WebGLTemplates/
websockify/
Unity uses the SimpleWebServer executable to run the server locally. This program takes the following parameters
usage: SimpleWebServer.exe source_directory [port] [pid] [<wasmEncoding>]
Is there anywhere we can set the port and pick the directory when this happens in the WebGL build process?

