How to build your game in Unity

After you have made your first game, now it’s time to publish it. You need a executable file depending on your platform. In this tutorial, we will see how to build your game for different platforms.

You can access the Build settings by going to File>Build Settings.

If you have not switched your platform already you can switch it from the Build Settings window.

Before you can build your game, you need to take care of the following settings.

  1. Switch to your target platform.
  2. Add your required scenes to the build setting window.
  3. Click on player settings and complete it based on your target platform.

Switching your platform in Unity

  1. Open Build setting window by going to File>Build settings.
  2. Select your target platform on the left pane.
  3. If you have not installed the required components you need to do steps 4 to 7, or else skip to step 8.
  4. Go to Unity hub and select the installs tab.
  5. Select the Unity version and click on the gear icon.
  6. Click on Add modules.
  7. Select the required modules and click install.
  8. Click on Switch Platform.
  9. Unity will import all your current assets to the new platform.

Adding required scenes to Build setting

  1. Open Build settings window.
  2. Drag the Build setting window on to any side so that you can access the project window.
  3. Open your scenes folder.
  4. Drag and drop the scenes into the Build setting window in the order of gameplay.
  5. You can drag the scenes up and down in the build setting window to change the hierarchy.

Completing player settings

You need to complete the player settings before building your game.

  1. You can open Player settings from the Build settings window. Or else go to File>Project settings> Player.
  2. Fill in your company name and product name.
  3. Upload a logo.
  4. Go to Other settings and complete your platform related settings.
  5. If you are publishing a test build then there is no need to complete the publisher settings.
  6. If you plan to build for final release then you will need a keystore to protect your executable.

Go back to the Build settings window and you can see that the switch platform button has changed to Build button.

Clear all your console errors.

Click on the build button and give a name to your game. Unity will take time to build your game depending on the size of your game.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.