How To Create A Windows Installer For Your Unity Game

No Comments
Published: 04.12.2022

Are you interested in learning how to create a windows installer for your Unity game? In this post, I will show you how to do so step-by-step! I needed this solution because I participated in the Game Off 2022 over the past weeks and wanted to submit my game with a working installer! So let’s head right into it!

Requirements

Before we can start, you will need the following things:

Create a build for your Unity game

First, we have to create a build of your Unity game. If you already did that, you can skip this step.

  1. Go to “File > Build Settings”.
  2. If not already done, add all the scenes you want to be build
    unity project build settings
  3. Click on “Build”
  4. If you don’t already have a folder to store your build create one at the root of your project.
    build root 
folder
  5. Inside this folder, create another one called “MainBuild”.
    build subfolder
  6. Then select this folder to hold your new build.
  7. After the build finishes, you can check the directory for an executable with your game’s name.
    windows installer unity game: final build

Create a windows installer for your Unity game

Now that we have a build directory with the game and all the needed files, we can go ahead and create the installer:

  1. Start Inno Setup
  2. Choose “Create a new script file using the Script Wizard” and click on “OK”
    windows installer unity: create new script
  3. Click on “Next” and don’t select “Create a new empty script file”
  4. Fill in the four fields: Application name, Application version, Application publisher, Application website, and click on “Next”
  5. Leave the settings as is, or change them the way you want. Then click on “Next”
  6. This step is important. Select your main executable in the build directory, and then click on “Add folder…” in the lower section. Here you choose the root folder (we called it MainBuild) of your executable.
    windows installer unity game: application files
  7. Deselect “Associate a file type to the main executable” and click on “Next”.
  8. Leave the settings as is, or change them the way you want. Then click on “Next”.
  9. Click on “Next”.
  10. Select “Ask the user to choose the install mode at startup” and click “Next”.
  11. Choose which Installer languages should be included and click “Next”.
  12. Now select the output folder and the base file name, and if you have an Icon (it needs to be a .ico file). After that, click “Next”.
    windows installer unity game: compiler settings
  13. Click on “Next”.
  14. Then, click on “Finish”.
  15. You will be asked if you want to compile the script. Click on “Yes” and continue.
  16. You will be asked if you want to save the script. Click on “Yes” and continue. (I chose the Builds directory that we created earlier, in the root of my project)
  17. After the script finishes the compilation, you will find an installer in the specified directory.
  18. Try it out and celebrate your installer!🎉

Conclusion

This guide taught us how to create a Windows installer for our Unity Game. If you have any questions or encounter any problems, feel free to leave a comment or email me at mail@programonaut.com.

In case you liked this post consider subscribing to my newsletter to get monthly updates on my posts.

Need help or want to share feedback? Join my discord community!

[convertkit form=2303042]

Discussion (0)