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

Setting the Animator's Parameters with code

We have a script named ShowHidePanels.cs attached to the Main Camera that would bring the Pause Panel and Inventory Panel up when the P and I keys are pressed. Sadly, it no longer functions, since the animations now supersede the properties of the Canvas Groups we set within it. We can reuse the logic, but will have to do a bit of work to get out panels popping again.

The changes that we will make to ShowHidePanels.cs will cause the panels in preceding chapter scenes to stop appearing. If you plan on accessing the previous chapter scenes, save a secondary copy of this script as it is now so that you can access it later. 

To trigger the animations on the Pause Panel and Inventory Panel with code, ...

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