Overview of the UI

Imagine a watch without a watch face to indicate the time. An interface provides important information to us, such as time, so that we can make informed decisions (for example, whether we have enough time to get ice cream before the movie starts). When it comes to games, the User Interface (UI) plays a vital role in how information is conveyed to a player during gameplay. UIs provide important and sometimes vital information (for example, statistics, health, ammunition count) to a player during gameplay. The implementation of a UI is one of the main ways to exchange information with the player about moment-to-moment interactions and their consequences (for example, taking damage). However, UIs are not just about the exchange of information, they are also about how information is provided to a player and when. This can range from the subtle glow of a health bar as it depletes, to dirt covering the screen as you drive a high-speed vehicle through the desert. There are four main ways that UIs are provided to players within a game, which we will discuss shortly.

The purpose of this chapter is to prime you with the fundamentals of UIs so that you not only know how to implement them within Unity but also how they relate to a player's experience. Toward the end of the chapter, we will see how Unity handles UIs, and we will implement a UI for our first game. In fact, we will insert a scoring system as well as a Game Over Screen. There will be some additional considerations that you can experiment with in terms of adding additional UI elements that you can try implementing on your own.

While it is not essential for what you will learn in this book, if you want to further develop your skills when it comes to UIs within Unity, I recommend the following book: Unity UI Cookbook, Packt Publishing. It has a perfect set of recipes that are ready-to-use. There you will find all the concepts mentioned here and much more, such as different tips and tricks.

You can find it at https://www.packtpub.com/game-development/unity-ui-cookbook or by scanning the following QR code:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset