- Once downloaded, open this project via Unity Hub.
- Navigate to
Assets/Scenes/SampleSceneand open that scene. - Press Play to test the scene in the Unity environment.
Here are the steps to export this project for the configured Devvit Unity Starter Template:
-
In Unity, select File > Build Profiles and switch the active platform to Web.
-
In the Build Profiles window, select Player Settings to open the Player Settings window.
-
In Player Settings, scroll down to Publishing Settings and ensure Decompression Fallback is selected.
-
Now we are ready to export, but the project needs to be built twice:
a. Set the Compression Format to GZip and select Build in the Build Profiles window.
b. Copy the following files into yoursrc/client/Public/Buildfolder of the Devvit Starter Template:exportName.data.unitywebexportName.wasm.unityweb
c. Next, in Publishing Settings, set Compression Format to Disabled and select Build again.
d. Copy the following file into yoursrc/client/Public/Buildfolder:exportName.framework.js
-
Run
npm run devin your Devvit project to update the Unity app running within Reddit.