6.3 - Sharing your Projects
30 Mins
For Educators
In this lesson, you will learn how to build your projects so that they’re playable outside of the Unity interface. First, you will install the necessary export modules to be able to publish your projects. After that, you will build your project as a standalone app to be played on Mac or PC computers. Finally, you will export your project for WebGL and even upload it to a game sharing site so that you can send it to your friends and family.
Project Outcome:
Your project will be exported and playable as a standalone app on Mac/PC or for embedding online.
Topics we'll cover
Recommended Unity Versions
2018.4 and Above
6.3 - Sharing your Projects
Install export Modules
Before we can export our projects, we need to add the “Export Modules” that will allow us to export for particular platforms.
  1. Open Unity Hub and click to Add Modules to the version of Unity you have used in the course
  2. Select WebGL Build Support, and either Mac or Windows build support, then click Done and wait for the installation to complete

Build your game for Mac or Windows
Now that we have the export modules installed, we can put them to use and export one of our projects
  1. Open the project you would like to build (could be a prototype or your personal project)
  2. In Unity, click File > Build Settings, then click Add Open Scenes to add your scene
  3. Click Player Settings and adjust any settings you want, including making it “Windowed”, “Resizable”, and whether or not you want to enable the “Display Resolution Dialog”
  4. Click Build, name your project, and save it inside a new folder inside your Create with Code folder called “Builds
  5. Play your game to test it out, then if you want, rebuild it with different settings

Build your game for WebGL
Since it is pretty hard to distribute your games on Mac or Windows, it’s a good idea to make your projects available online by building for WebGL.
  1. Reopen the Build Settings menu, select WebGL, then click Switch Platform
  2. Click Build, then save in your “Builds” folder with “ - WebGL” in the name
  3. Try clicking on index.html to run your project (you may have to try opening with different browsers)
  4. Right-click on your WebGL build folder and Compress/Zip it into a .zip file
  5. If you want, upload it to a game sharing site like itch.io

Lesson Recap
New Concepts and Skills
  • Installing export modules
  • Building for Mac/PC
  • Building for WebGL/HTML