If you are a maintainer of this project, and you modified the demo scene distributed with the package, you will want to update the Build/
directory (hosted online here).
-
Launch
Edit > Build Settings > Project Settings
. FromPlayer Settings…
(Edit > Project Settings > Player
), select theWebGL settings
tab (HTML5 icon), toggle theResolution and Presentation
view, and selectWebXR
for theWebGL Template
. -
Launch
Edit > Build Settings > Project Settings
. Then, press theBuild and Run
button, andSave
to the directory namedBuild
.
If you are contributing to the Assets, you can build and export a new version of the WebXR-Exporter.unitypackage
file.
Notice that the package does not include all the assets in the repository but only those under WebXR
, and WebGLTemplates/WebXR
:
-
Open
Assets > Export Package…
. A window titledExporting package
will appear. Press theExport…
button to proceed. -
When prompted for the file location, set
WebXR-Exporter
as the filename of the destination Unity Asset Package, and press theSave
button.
Both of the above products can be built via menu or command line. The project includes a C# script at Assets/Editr/Builder.cs
with methods for building. It presents a Build
menu in the editor which you can use to build the products above in one click.
You can invoke the methods in the script from the command line by using -executeMethod
parameter as documented at https://docs.unity3d.com/Manual/CommandLineArguments.html
Product | Command |
---|---|
Package | <path-to-editor> -projectPath <path-to-project> -batchMode -executeMethod WebXR.Editor.Builder.BuildPackage -quit |
Desert Sample | <path-to-editor> -projectPath <path-to-project> -batchMode -executeMethod WebXR.Editor.Builder.BuildDesertSample -quit |
Package and Sample | <path-to-editor> -projectPath <path-to-project> -batchMode -executeMethod WebXR.Editor.Builder.BuildAll -quit |