Chapter 1. UI Essentials

In this chapter, we will cover the following recipes:

  • Setting up a 2D texture to be a bordered sprite
  • Resizing the UI according to screen size and resolution
  • Adding and placing an image in the UI
  • Adding a circular mask to an image
  • Making an image scrollable
  • Making text scrollable with a vertical slider
  • Selecting buttons through the keyboard
  • Using UI layout components

Introduction

This chapter explains how to use the essential tools for creating more complex interfaces. These tools include placing and scaling UI elements, using masks to shape figures, and making images and text scrollable along with sliders.

We start by creating a sprite with a border. It can be scaled up or down without distorting. Then, we will proceed with explaining ...

Get Unity UI Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.