Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Unity 2020 Mobile Game Development

You're reading from   Unity 2020 Mobile Game Development Discover practical techniques and examples to create and deliver engaging games for Android and iOS

Arrow left icon
Product type Paperback
Published in Aug 2020
Publisher Packt
ISBN-13 9781838987336
Length 464 pages
Edition 2nd Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
John P. Doran John P. Doran
Author Profile Icon John P. Doran
John P. Doran
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Building Your Game 2. Project Setup for Android and iOS Development FREE CHAPTER 3. Mobile Input/Touch Controls 4. Resolution-Independent UI 5. Advertising Using Unity Ads 6. Implementing In-App Purchases 7. Getting Social 8. Keeping Players Involved with Notifications 9. Using Unity Analytics 10. Making Your Title Juicy 11. Game Build and Submission 12. Augmented Reality 13. Other Books You May Enjoy

Putting the project on your Android device

The following steps may be different for you depending on your Android version. If you are using Android Oreo or higher, start with step 5. If you have version 7 or lower, start at the beginning:

  1. On your Android device, you'll need to go to your Settings app.
  2. From there, scroll down till you get to the Security | Security & location section or similar, and then tap on it to go into the menu.
  1. Inside there, you'll see a section called Unknown sources, which you'll want to enable:

With this enabled, your device can now install the .apk file, but now you will need to move your game over to the device so that you can install it. The easiest way is to transfer it to your device via USB; we'll do that now.

For those of you who'd rather not use USB, I would suggest using a cloud storage app, such as Dropbox, to upload the .apk file and then download it from the app and install that way. There's also another tool called ADB, which can send files to your phone via USB or WiFi. For more information on that and the rest of the Android build process, check out https://docs.unity3d.com/Manual/android-BuildProcess.html.
  1. Connect your phone to your computer via USB. Upon being connected, your phone will show a notification saying that it's connected via USB for charging. Click on that notification and change the option to File Transfer:
  1. After that, go back to your computer and go into Windows Explorer/Finder, and then go to the Devices and Drives section; you should see your device appear there:
  1. Double-click on your device and access the internal shared storage section from there. Then, drag the .apk file we made before into this folder:
  1. Now, back in your phone, open the Files/File Explorer app. From there, click on the button on the right-hand side and select Show internal storage:
  1. Then, click on the button in the top-left corner and select your phone's name (in my case, Pixel 3a XL):
  1. From there, select your .apk file listed from the files included:
  1. You'll be asked to confirm the installation. Hit the Continue button:
  1. This will open up the installer. Go ahead and click on the Install button and wait for it to finish:
  1. You may see a window pop up that mentions that Play Protect doesn't recognize the developer. We will see how to solve this issue later on in Chapter 12, Game Build and Submission, but for now, click INSTALL ANYWAY and wait for the installation to finish:
Of course, I can't note the steps for all devices as some have different drivers that are required or additional steps that need to be performed in order to open files on the device. If these steps do not work and you do not know how to get files onto your device and access them and add new ones to them, go ahead and search for phone name file transfer, replacing the phone name with your phone's name.
  1. Once it's finished, go ahead and click on the Open button to open our game:

As you can see, the game is on there and it's working. Granted, you can't control it yet, and there are a lot of new things that you can't do, but this lets you know that you've set up your Android device properly. Now that you have your game on an Android device, you now need to get it working on iOS, which we will cover in the next section.

You have been reading a chapter from
Unity 2020 Mobile Game Development - Second Edition
Published in: Aug 2020
Publisher: Packt
ISBN-13: 9781838987336
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 €18.99/month. Cancel anytime