CHAPTER 18
Beginner
Publishing and Monetization
Updated: May 16, 2026
25 min read
# CHAPTER 18
Publishing and Monetization
1. Introduction
You have spent months pouring your heart into a game. The code is clean, the art is beautiful, and the physics are flawless. But a game only truly exists when people can play it. Now, you must transition from a Game Developer into a Game Publisher. In this chapter, we will master Publishing and Monetization. We will learn how to compile your raw editor files into a standalone playable.exe or .apk. We will also explore how independent developers survive financially by integrating Unity Ads and setting up In-App Purchases (IAP).
2. Learning Objectives
By the end of this chapter, you will be able to:- Configure Player Settings (Icons, Splash Screens, Resolution).
- Build and compile a standalone PC game.
- Build an Android App Bundle (.aab) for the Google Play Store.
- Understand the integration of Unity Ads for monetization.
- Understand the basics of In-App Purchases (IAP).
3. Player Settings (The Final Polish)
Before you hit "Build", you must configure how the app behaves on the user's machine.- 1. Go to Edit -> Project Settings -> Player.
- 2. Company Name & Product Name: This dictates the name of the installed app.
- 3. Icons: Upload your 512x512 app icon here.
- 4. Resolution and Presentation: Decide if your PC game launches in Windowed or Fullscreen mode. For mobile, decide if the game is locked to Portrait or Landscape orientation.
- 5. Splash Image: By default, the "Made with Unity" logo shows on startup. (To remove this, you must purchase a Unity Pro license).
4. Building for PC (Steam/Itch.io)
Compiling a PC game is very straightforward.- 1. Go to File -> Build Settings.
- 2. Ensure Windows, Mac, Linux is selected as the Platform.
- 3. Click Build.
- 4. Create a new, empty folder on your desktop called "MyGameRelease". Select it.
-
5.
Unity will compile the code. When finished, you will have a
.exefile and an associatedDatafolder. Zip these together, and you can upload them directly to Steam or Itch.io!
5. Building for Android (Google Play)
Publishing to Google Play requires a specific format.- 1. Switch your Platform to Android in the Build Settings.
-
2.
In Project Settings -> Player -> Other Settings, you must enter a Package Name (e.g.,
com.YourCompany.YourGame).
- 3. Google requires a Keystore (a digital signature proving you are the author). In the Publishing Settings, use the Keystore Manager to generate a password-protected key.
- 4. Check the box for Build App Bundle (Google Play) in the Build Settings.
-
5.
Click Build. This generates an
.aabfile, which is the exact file format required by the Google Play Developer Console.
6. Monetization: Unity Ads
If your mobile game is free, Ads are the primary way to earn revenue.- 1. Go to the Window -> General -> Services tab in Unity.
- 2. Link your project to your Unity ID.
- 3. Turn on the Ads service.
- 4. Install the "Unity Ads" package via the Package Manager.
-
5.
In C#, initialize the Ads SDK. When the player dies, you can call
Advertisement.Show("RewardedAndroid")to play a 30-second video.
- *Rewarded Ads* (giving the player 100 coins for watching an ad) have the highest player retention and revenue metrics in the industry!
7. Monetization: In-App Purchases (IAP)
To sell a "Remove Ads" button or a "Sword of 1000 Truths" for $1.99:- 1. Turn on the In-App Purchasing service in the Unity Services window.
-
2.
Create an exact product ID (e.g.,
removeads01) in your Google Play/Apple App Store console.
- 3. Enter that exact ID into Unity's IAP Catalog.
-
4.
When the player clicks "Buy" in your UI, Unity communicates securely with Google/Apple to process the credit card, and fires a
PurchaseSuccessfulevent in your C# script to unlock the item.
8. Visual Learning: The Publishing Pipeline
txt
9. Best Practices
- Never Test Real Ads: When implementing Unity Ads or IAP, ensure "Test Mode" is enabled in the Unity Dashboard. If you click on real ads in your own game during development, ad networks will flag your account for click fraud and permanently ban you from earning revenue.
10. Common Mistakes
- Forgetting the Keystore Password: The Android Keystore is your digital identity. If you update your game 6 months from now, but you forgot the password to the Keystore you used for Version 1.0, Google will absolutely refuse to let you upload the update. Write that password down in a secure physical location!
11. Mini Project: Prepare a Build Folder
Objective: Compile your first standalone PC game.- 1. Open the project we have been building.
- 2. Go to File -> Build Settings. Ensure the "Scenes In Build" box contains your Main Menu and your Level.
- 3. Go to Player Settings. Set your Company Name and upload a temporary 2D sprite as the Icon.
- 4. Ensure target platform is Windows/Mac.
- 5. Click Build. Create a folder named "Builds" on your Desktop.
-
6.
When Unity finishes, open the folder. Double-click the
.exefile.
- 7. Congratulations! You are playing your game completely independent of the Unity Editor. It is ready to be zipped and sent to a friend.
12. Practice Exercises
- 1. What specific file format must you generate in Unity to upload an Android game to the modern Google Play Store?
- 2. What digital security file is required by Google/Apple to prove you are the original author of an application?
13. MCQs with Answers
Question 1
A developer wants to remove the "Made with Unity" splash screen that appears when the compiled game boots up. How is this achieved?
Question 2
Which type of mobile advertisement generally yields the highest revenue and player satisfaction?
14. Interview Questions
- Q: Explain the purpose of an Android Keystore in the publishing pipeline. What are the severe consequences of losing this file after a game has been published?
-
Q: Contrast the
.apkfile format with the.aab(Android App Bundle) format. Why did Google mandate the shift to App Bundles for the Play Store?
- Q: Walk me through the conceptual pipeline of an In-App Purchase (IAP). How does the game verify that the transaction was secure before granting the player the premium item?
15. FAQs
Q: How much does it cost to publish a game? A: Steam currently charges a $100 fee per game (which you can earn back). Google Play requires a one-time $25 developer account fee. Apple requires a $99/year subscription. Publishing on indie sites like Itch.io is completely free!16. Summary
In Chapter 18, your game finally left the nest. We navigated the Player Settings, configuring icons and resolution parameters. We executed the build pipeline, compiling standalone.exe files for PC and signing .aab bundles for the Google Play Store. Finally, we explored the business of game development, outlining the integration of Unity Ads and In-App Purchases to generate revenue from free-to-play titles.