Skip to Content
Mastering UI Development with Unity
book

Mastering UI Development with Unity

by Dr. Ashley Godbold
April 2018
Beginner content levelBeginner
468 pages
11h 7m
English
Packt Publishing
Content preview from Mastering UI Development with Unity

Showing and hiding pop-up menus with keypress

So far, we have made two panels that we plan on making pop-ups: Pause Panel from Chapter 2, Canvases, Panels, and Basic Layout and Inventory Panel from Chapter 3, Automatic Layouts. Right now they are both visible in the scene (even though Pause Panel is hidden behind the Inventory Panel). We want them to pop up when we press specific p and i on the keyboard. For demonstration purposes, we'll access the keyboard keys differently for each panel.

Remember that both of these panels have Canvas Group components on them. These components will allow us to easily access the panels' alpha, intractable, and blocks raycasts properties.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Game Development with Unity for .NET Developers

Game Development with Unity for .NET Developers

Jiadong Chen
Unity UI Cookbook

Unity UI Cookbook

Francesco Sapio

Publisher Resources

ISBN: 9781787125520Supplemental Content