/
Building and Hosting Unity WebGL Applications on Launch

Building and Hosting Unity WebGL Applications on Launch

Building WebGL

Using the Motive WebGL Template

The default Unity WebGL template does not work for content hosted on Motive Launch Server. Motive’s WebGL Template includes some changes that pass the security credentials and other parameters required into the WebGL app so that it runs properly.

Step 1: Make a copy of the template folder

  1. Select the Motive/Content/WebGLTemplates/Motive folder

  2. Select Edit > Duplicate. This will make a “Motive 1” folder.

Step 2: Copy to the root of your project

The Unity web builder will only use templates stored in a “WebGLTemplates” folder in the root Assets directory.

  1. Create a folder named “WebGLTemplates” (all one word, no spaces)

  2. Move the “Motive 1” folder into it

Step 3: Set the template in the build settings

  1. In the Player Settings, select the “Motive 1” template:

Build & Upload

Build for WebGL Target

This will build your WebGL App into a local folder.

Upload to Launch

  1. Create a WebGL Application

  2. Create a version for the Application

    1. Give the version a name

    2. Click the upload button and select the root of the WebGL Application folder

    3. Click “Create”

Note: you may need to refresh the screen to see your web app

Test

You can launch your uploaded app directly by clicking the Unity icon for the version you just uploaded in the WebGL page. This will load your app and connect you to Storyflow so that you can test your authored content directly on the web.

Related Articles

WebGL Support

Troubleshooting WebGL

Related content

WebGL Support
WebGL Support
More like this
Unity Testing with Mock HMD
Unity Testing with Mock HMD
Read with this
Configuring Unity for VR Training with Motive
Configuring Unity for VR Training with Motive
More like this
WebGL Keyboard/Mouse Layout Testing
WebGL Keyboard/Mouse Layout Testing
Read with this
Configuring the LSDK Sample App
Configuring the LSDK Sample App
More like this
WebGL (Launch Component)
WebGL (Launch Component)
More like this