// ================================================================ //

    void    Awake()
    {
        // 垫在下面
        this.underlay = GameObject.Instantiate(this.underlay_prefab).GetComponent <UIUnderlay>();
        this.underlay.GetComponent <RectTransform>().SetParent(this.GetComponent <RectTransform>());
        this.underlay.GetComponent <RectTransform>().SetSiblingIndex(0);

        this.gameObject.SetActive(false);
    }
示例#2
0
    // ================================================================ //

    void    Awake()
    {
        this.ui_text   = this.GetComponentInChildren <UnityEngine.UI.Text>();
        this.ui_button = this.GetComponent <UnityEngine.UI.Button>();

        // 下じき.
        this.underlay = GameObject.Instantiate(this.underlay_prefab).GetComponent <UIUnderlay>();
        this.underlay.GetComponent <RectTransform>().SetParent(this.GetComponent <RectTransform>());
        this.underlay.GetComponent <RectTransform>().SetSiblingIndex(0);
    }