Book Image

Mastering UI Development with Unity

By : Ashley Godbold
Book Image

Mastering UI Development with Unity

By: Ashley Godbold

Overview of this book

A functional UI is an important component for player interaction in every type of video game. Along with imparting crucial statistical information to the player, the UI is also the window through which the player engages with the world established by the game. Unity's tools give you the opportunity to create complex and attractive UIs to make your game stand out. This book helps you realize the full potential of Unity's powerful tools to create the best UI for your games by walking you through the creation of myriad user interface components. Learn how to create visually engaging heads-up-displays, pause menus, health bars, circular progress bars, animated menus, and more. This book not only teaches how to lay out visual elements, but also how to program these features and implement them across multiple games of varying genres. While working through the examples provided, you will learn how to develop a UI that scales to multiple screen resolutions, so your game can be released on multiple platforms with minimal changes.
Table of Contents (12 chapters)

Mobile-Specific UI

If you are creating a game for multiple platforms, you really have to consider making interfaces that either work on all platforms you plan on developing for, or make device-specific interfaces. One advantage of the Unity Event System is that it translates very well to mobile devices. An action such as clicking a button with a mouse translates perfectly to a touch or tap gesture. There are a few interactions that don't translate, however, such as keyboard key presses, right-clicking, and scrolling the mouse wheel. Let's discuss a few items of UI design that are specific to mobile/touchscreen devices.

In this chapter, we will discuss the following topics:

  • The recommended button sizes for mobile games
  • Laying out interactions based on the thumb zone
  • How to access multi-touch
  • When to use the accelerometer and gyroscope
  • Creating on-screen D-pads
...