
Unity UI Cookbook
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
- [*] Discover how to implement and deal with various in-game UI elements that will impress your players
- [*]This practical recipe guide will help you to efficiently create powerful and remarkable UIs using C# code
Book DescriptionWith the increasing interest in game development, it's essential to design and implement a UI that reflects the game settings and shows the right information to the player. The Unity system is used to create complex and aesthetically pleasing user interfaces in order to give a professional look and feel to a game. Although the new Unity UI system is powerful and quite easy to use, by integrating it with C# scripts, it's possible to realize the potential of this system and bring an impressive UI to games. This guide is an invaluable collection of recipes if you are planning to use Unity to develop a game. Starting with the basic concepts of the UI components, we'll take you all the way through to creating complex interfaces by including animations and dynamics elements. Based on real-world problems, these recipes will start by showing you how to make common UI elements such as counters and healthbars. You will then get a walkthrough of how to manage time using timers, and will learn how to format them. You will move on to decorating and animating the UI elements to vivify them and give them a professional touch. Furthermore, you will be guided into the 3D UI world and into HUD scripting. Finally, you will discover how to implement complex minimaps in the interface. What you will learn - [*] Implement different kinds of counters and healthbars
- [*] Deal with timers and find out how to format them
- [*] Animate and vivify UI elements
- [*] Handle runtime customizations
- [*] Add complex Head-up displays (HUDs)
- [*] Design and implement 3D UIs
- [*] Integrate minimaps in the UI
Who this book is forIf you are a game developer with some experience in Unity and C# and want to create the best interactive experience fast and intuitively, then this book is for you. If you are an intermediate game developer or an expert, these recipes will help you bring out the power of the new UI Unity system.
All prices
More details
Other editions
Additional editions

Person
Francesco Sapio received his Master of Science in Engineering in Artificial Intelligence and Robotics degree from Sapienza University, Rome, Italy, a couple of semesters in advance, graduating with summa cum laude; he is currently a researcher at the same university. He is an Unreal and Unity 3D expert, skilled game designer, and an experienced user of major graphics programs. He helped the development of many games (both educational and commercial). He is also an active writer on the topic of game development. Finally, Francesco loves math, philosophy, logic, and puzzle solving, but most of all, creating video gamesthanks to his passion for game designing and programming.
Content
- Cover
- Copyright
- Credits
- About the Author
- About the Reviewers
- www.PacktPub.com
- Table of Contents
- Preface
- Chapter 1: UI Essentials
- Introduction
- Setting up a 2D texture to be a bordered sprite
- Resizing the UI according to the 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
- Chapter 2: Implementing Counters and Health Bars
- Introduction
- Implementing a score counter
- Implementing a lives counter
- Creating a modular coin counter
- Creating a symbolic lives counter
- Implementing a linear health bar
- Implementing a radial health bar
- Creating a health bar with armor
- Using multiple bars to make a multibar
- Developing a kingdom hearts health bar style
- Chapter 3: Implementing Timers
- Introduction
- Implementing a numeric timer
- Creating a linear timer
- Implementing a radial timer
- Creating a mixed timer
- Creating a well-formatted timer
- Developing a well-formatted countdown that changes
- Chapter 4: Creating Panels for Menus
- Introduction
- Creating a toggle group
- Showing the slider value as a percentage
- Adding upper and lower bounds to the slider
- Making UI elements affected by different lights
- Making a draggable panel
- Making a resizable panel
- Creating a drag-and-drop element
- Developing an MP3 player
- Chapter 5: Decorating the UI
- Introduction
- Creating an extendable element with a final fade effect
- Creating an extendable and rotating element with a final fade effect
- Creating bars that go up and down
- Making a floating UI element
- Adding shadows to text
- Adding outlines to text
- Chapter 6: Animating the UI
- Introduction
- Appearing and disappearing menu
- Creating a menu with an entrance transition
- Creating a menu with an idle animation
- Animating a button when the cursor is over it
- Creating a pop-up menu
- Animating hearts of the symbolic lives counter
- Changing animation of the hearts of the symbolic lives counter through the script
- Chapter 7: Applying Runtime Customizations
- Introduction
- Making a button that changes color
- Creating a slider that changes colors gradually
- Creating a slide shower using a discrete slider
- Creating a slider that changes a single color channel
- Making an input field with personal text validation at runtime
- Making an input field for a password with a lower bound limit for characters
- Changing the cursor at runtime
- Chapter 8: Applying Runtime Customizations
- Introduction
- Creating a distance displayer
- Creating a directional radar
- Developing a subtitle shower
- Chapter 9: Diving into 3D UIs
- Introduction
- Creating a 3D menu
- Adding a smooth tilt effect
- Creating and placing a 3D UI
- Making an animated 3D UI warning
- Chapter 10: Creating Minimaps
- Introduction
- Creating a minimap
- Implementing advanced features for minimaps
- Index
System requirements
File format: ePUB
Copy protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (not Kindle).
The file format ePub works well for novels and non-fiction books – i.e., „flowing” text without complex layout. On an e-reader or smartphone, line and page breaks automatically adjust to fit the small displays.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our ebook Help page.
File format: PDF
Copy-Protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (only limited: Kindle).
The file format PDF always displays a book page identically on any hardware. This makes PDF suitable for complex layouts such as those used in textbooks and reference books (images, tables, columns, footnotes). Unfortunately, on the small screens of e-readers or smartphones, PDFs are rather annoying, requiring too much scrolling.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our eBook Help page.