Deploying Your Unity WebGL Game Through Sample App
This section requires that you have an existing Unity WebGL project and have already setup the Sample App. If you haven't setup Sample App, you may want to start with the section Getting Started With Sample App Locally.
Creating a Build in Unity
Once you have your Unity WebGL project, you can navigate to the menu within Unity at File > Build Settings. From here, all you need to do is click "Build" and select a destination for your new WebGL build.
Updating File Paths for Sample App
Once you have your build files, you'll have to make sure that they match the paths that are expected in Sample App. For this example, we will rename our files directly before adding them to Sample App, but you may want to update the paths within Sample App instead. By default Sample App expects the files within build to have the name "WebGL".

Adding the Build Files to Sample App
For this step, we only need the files in the Build folder from the unity build. We will use them to replace the existing files in the public/unity/Build directory.
Run Your App
Now that you have the build in your app, you should be able to run it, login and play. Just make sure that your Unity project is configured to handle receiving the didtoken for a user. You can view more details on configuring your Unity project to handle the didtoken in the Login + Authentication section.
Last updated