Unity WebGL Example
This document provides a guide for creating a sample app in Unity, building the app for WebGL, and deploying the app to VIVERSE.
Introduction
Anyone can publish their WebGL-compatible Unity project to VIVERSE in a few simple steps. In this guide, we'll walk through the process of creating an new Unity project, making sure it is compatible with WebGL, and publishing to VIVERSE using the VIVERSE CLI.
While VIVERSE is a great place for multiplayer games with networked avatars — and we have a number of services that can help you implement these features — it is not required to implement networked avatars to publish to VIVERSE.
Prerequisites
Unity Hub and Unity with the WebGL platform for that version of unity installed on your device, in the hub you should see the WebGL platform module next to the version of unity you're using.
In this tutorial, we will be using Unity v6.1, however any WebGL-compatible version of Unity should be supported.
A. Configure Your Unity Project
Install the Unity Plugin
Go to the Package manager
Press the "Plus icon" and select "Add from git URL", and add the url "[email protected]:ViveDeveloperRelations/ViverseUnitySDK.git"
Open the menu Tools/WebGL Build Settings

It should look like the above, select "Apply WebGL Settings" to apply the appropriate settings
Selecting auto-zip builds after completion will allow you to quickly upload builds to the studio.viverse.com site
The selection for decompression fallback and other relevant settings will be there
B. Build and Publish to VIVERSE
Test & Configure World Settings
Navigate to the preview url created for the world. You can also access the world and its settings in studio.viverse.com/content.


Submit for Curation and Discovery
By default, worlds uploaded will only be accessible via preview urls. For placement and curation on our webpages, meaning your experience will be easier to share, please submit for review.
Iterate, Learn, Explore!
In addition to the sample scenes, the rough flow of api usage can be reviewed at https://github.com/ViveDeveloperRelations/ViverseUnitySDK/blob/master/Unity_Viverse_SDK_Developer_Guide.md And overview of the current version of the sdk with additional hints and tips at https://github.com/ViveDeveloperRelations/ViverseUnitySDK?tab=readme-ov-file#viverse-unity-sdk-for-webgl
Last updated
Was this helpful?