Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Unity 5 for Android Essentials

You're reading from   Unity 5 for Android Essentials A fast-paced guide to building impressive games and applications for Android devices with Unity 5

Arrow left icon
Product type Paperback
Published in Aug 2015
Publisher
ISBN-13 9781784399191
Length 200 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Valera Cogut Valera Cogut
Author Profile Icon Valera Cogut
Valera Cogut
Arrow right icon
View More author details
Toc

Configuring Unity 5 for Android devices

Once you have installed the Android SDK and set up Unity, you must configure the correct settings for each of your Android project. We will begin our review by considering the Resolution And Presentation options as shown in the following screenshot. In order to access the Android platform settings in Unity, it is necessary to navigate to the Edit | Project Settings | Player menu and then click on the button with the Android icon. Also, the other way of getting to the Android platform settings is by navigating to File | Build Settings. After opening the window, you will need to click on the Player Settings button at the bottom.

The Default Orientation option is shared between multiple mobile platforms. This setting is necessary in order to indicate the orientation of the screen which is designed for your game or your application. The default is Automatic Rotation for all settings. If, for example, your project is designed only for the portrait orientation of the screen, then you need to select either the Portrait or Portrait Upside Down value:

Configuring Unity 5 for Android devices

We can pick one of the following properties: Portrait, Portrait Upside Down, Landscape Right, Landscape Left, and Auto Rotation. They are pretty plain and speak for themselves. You just need to play a little with them to see their true purpose. The Status Bar Hidden checkbox needs no explanation because its meaning is obvious.

A subsequent option that we will survey is known as Use 32-bit Display Buffer. You can decide if the display buffer should handle 16-bit color values (if not 32-bit enabled) or if it should handle 32-bit color values. Remember that you need to activate this setting only if you have some artifacts, because it greatly affects the performance. The Show Loading Indicator field ensures the ensuing behaviors for us: Don't Show, Large, Inversed Large, Small, and Inversed Small.

Configuring Unity 5 for Android devices

As shown in the preceding figure, there are a lot of settings; however, most of them can be left with default values except for a few that must be adjusted before making a build. You cannot build an APK file for your Android device without configuring the Bundle Identifier option, which is shared between mobile platforms. The Bundle Identifier string must match the provisioning profile of the game you are building. The fundamental structure of the identifier is com.Company.ProductName. The bundle version is responsible for holding the number that describes the release index. Moreover, Unity permits us to specify the minimum API level that will be supported by your Android project. Also, you can set the name and icon for your application. Other settings are obvious and do not require additional explanation. More detailed information can be found in the official documentation of Unity.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image