filmov
tv
Easily Manage the State of Your UI With This Pattern to Save Yourself Headaches | Unity Tutorial

Показать описание
On your UI do you have references from random scripts to other scripts to manage which one should be showing? Are you setting up the state of the next page in code where your UI scripts are tightly coupled?
In this video I'll show you the pattern I've been using for the last 6 years to remove that mess and separate the concerns of UI Sounds and Animations into a "Page" Monobehaviour that is controlled by the MenuController. With these two simple, but powerful scripts you can easily manage your UI page state in a simple, predictable, and powerful way.
At the end of this video you'll have:
A structured, proven paradigm to approach to managing pages on your UI
An easy way to decouple your animation and sound playing from your UI logic.
A tool to intelligently control what needs to be set up, when it needs to be set up, instead of having that hard coded in your scripts.
🧡 Believe in LlamAcademy's mission and have received value from the videos? Here's how you can show your support:
📚 Take my Unity ShaderGraph Course:
Some links may be affiliate links, which at no additional cost to you, gives me a small portion of the purchase.
Chapters
00:00 Introduction - What to Expect
03:24 Scene Overview
14:10 Hooking it all up
16:50 PlayerInput - Escape to go back
17:46 Demo
19:21 Explanation of Event Order
20:21 Setting up Events in the Editor
20:57 Demo - Events and Exit On Page Push
21:33 Closing
In this video I'll show you the pattern I've been using for the last 6 years to remove that mess and separate the concerns of UI Sounds and Animations into a "Page" Monobehaviour that is controlled by the MenuController. With these two simple, but powerful scripts you can easily manage your UI page state in a simple, predictable, and powerful way.
At the end of this video you'll have:
A structured, proven paradigm to approach to managing pages on your UI
An easy way to decouple your animation and sound playing from your UI logic.
A tool to intelligently control what needs to be set up, when it needs to be set up, instead of having that hard coded in your scripts.
🧡 Believe in LlamAcademy's mission and have received value from the videos? Here's how you can show your support:
📚 Take my Unity ShaderGraph Course:
Some links may be affiliate links, which at no additional cost to you, gives me a small portion of the purchase.
Chapters
00:00 Introduction - What to Expect
03:24 Scene Overview
14:10 Hooking it all up
16:50 PlayerInput - Escape to go back
17:46 Demo
19:21 Explanation of Event Order
20:21 Setting up Events in the Editor
20:57 Demo - Events and Exit On Page Push
21:33 Closing
Комментарии