ur-scape is developed with the Unity engine, which allows to generate projects not only as desktop applications, but also as JavaScript programs that can be run on a web browser.
This section will explain how to prepare, generate and deploy a WebGL instance.
For more information on Unity's WebGL build, please visit the following link: https://docs.unity3d.com/Manual/webgl-gettingstarted.html
Unity's WebGL module must be installed before creating a build.
Unity uses web templates to create WebGL builds. It already includes two templates ('default' and 'minimal') and also allows users to create their custom templates. For example, a custom template for deploying to Wordpress can be found in ur-scape's project.
For more information on WebGL templates, please visit the following link: https://docs.unity3d.com/Manual/webgl-templates.html
The template can then be selected in the project settings, under the Player
> Resolution and Presentation
section, in the WebGL
tab. In the case of the Wordpress template, it requires the user to fill in the Base url
property. This is the URL/path to where ur-scape's web instance will be located.
The WebGL build will generate the following files and folders:
Now that the WebGL programe is generated, we will need to add the existing data.
UpdateWebDB.bat
and UpdateWebDB.vbs
in your Data
folder. Otherwise, copy them from ur-scape's project.UpdateWebDB.bat
. This will generate a WebDB
folder with two files: headers
and patches
. This step needs to be repeated whenever a data layer changes, layers are added or removed, or layers.csv is changed.The WebGL folder should now be ready to be uploaded to the webserver. You may call the index.html
file directly in your web server, or copy the contents of the file, depending on your setup.