Let's talk about Unity's UI, which usually writes UI pages when a page needs to go to page B. At least get a reference to page B! The average newcomer will write a public gameobject UiB the properties of the page in the component and then drag and drop to get a reference to the B page.
When your UI is a lot of time drag the way it is difficult to find the page by those references. =.= Sometimes you just don't want to drag and drop to get a B-page reference, anyway, it always seems strange. Let's take a look at the UI Management Center.
first, the Management Center:
We create a class that specifically manages the reference to the UI, and if page a wants to get a reference to page B, get it directly to central administration. Page A – "Admin Center –" Page B. Management Center
Solve the problem: avoid confusing page references
We take a look at the operation between the page and the page, usually a page on the B page action: Refresh the data on page b, open the B page, close the B page and so on, a to B operation may need data (model) to execute. The process is as follows:
1. A set data storage Management Center
2. A send an event through central administration
3. B Select if you need to get parameters to perform some kind of behavior
Solve the problem: a page can send some events to B, and pass some parameters to B (easy and convenient many)
Eventually:
Project: Http://yunpan.cn/cdndYzcEaZFHC access password 6a8d
The Unity UI and the referenced Admin center