The Unity UI and the referenced Admin center

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.