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
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

Adding a pause menu

In PC games, pause menus will likely be triggered by the Esc key, whereas in a mobile game, it typically needs its very own button. We will make it so that this project supports both. Let's look at the steps:

  1. Open up the Gameplay Scene by going to the Project window, opening the Assets/Scenes folder, and double-clicking on Gameplay, thus saving the MainMenu level if you didn't do so already:

Before we create a button to open our pause menu, let's go ahead and create the pause menu that we'll be opening first.

  1. The first thing we'll do is dim our screen when we enter the pause menu. An easy way to do that is having an image scale to cover our entire screen, which is what the Panel object does by default. We can create it by selecting Game Object | UI | Panel. Note that this creates a Canvas object and an EventSystem object in addition to the Panel object, because one doesn't exist in this Scene already.
  2. Rename the Panel object to Pause...
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