Join Kelley Hecker for an in-depth discussion in this video Universal mobile build settings, part of Creating Mobile Games with Unity.
Now let's set up our project so that we can build it to our mobile device. For this course we're going to be working on a space arcade game. If I click on scenes in the project window and double click on main scene, I can see we already have a ship and some other components for our game. Select file, build settings. To open the build settings window, on the right below the scenes and build list, click on add current to add the current scene to the list. You can also drag the scene from the project window into the list.
From the platform list, select either Android or iOS, and click the switch platform button at the bottom. If you have a lot of assets already in your project, it can take a while for Unity to switch platforms, so I recommend you do this at the start of your project. Next, click the Player Settings button to open up the player settings. Here we can customize platform specific options for our game. Some of these settings are shared between iOS and Android. At the top fill in your company name and product name. The product name is what will appear on the device.
You can also assign an icon here if you like. Go to the Textures > Build folder, and drag the icon to the default icon box. If this is left blank it will show the default Unity icon. Select a tab for your device. The iOS tab looks like an iPhone and is the third from the left while the Android tab looks like the Android mascot and is the fourth from the left in the player settings. Select the resolution in presentation section. Here you can select which orientations your game will support.
From the drop down you can select Portrait, Portrait Upside Down, Landscape Left, or Landscape Right. You can also select Auto Rotation. If you select Auto Rotation, when the device changes orientation, your game will automatically change orientation as well, as long as that orientation is supported. When you select Auto Rotation you'll see that some check boxes appear. This will allow you to select which orientations you want to support. For example if I want to support landscape left and right, I would check portrait and portrait upside down.
Next select the icon section, you can see that unity automatically resizes your icon for you. Normally this is fine but if you want to be able to assign different images for the different sizes, select the Override for iPhone or Override for Android box. This will let you assign the images individually. Finally, let's click on Other Settings. We want to change our bundle identifier and bundle version number. The bundle identifier, is a unique way to identify our app. Usually the bundle identifier, is in the format, com, dot, company name, dot, product name.
This format is referred to as reverse DNS or reverse domain name notation. Using this format helps to ensure that we have a unique bundle identifier. Next you'll want to specify a version number. This should be three period separated integers, and is the version number that will be displayed in The App Store or Google Play. Normally, the first number is for major revisions that implement new features or major changes. The second number is for minor revisions which implement less prominent features. The last number is used for patch or maintenance revisions, like bug fixes.
Your version number will have to be incremented every time you submit to the App Store or Google Play, although you can increment it more often than that if you like. Now that we've customized our universal build settings, we're ready to look at Android and iOS specific settings.
- Installing SDKs and setting up developer accounts
- Accessing mobile data
- Creating a sprite atlas
- Reading console input on iOS and Android
- Checking the size of your assets