Example #1
0
 public override void Init()
 {
     base.Init();
     m_name    = m_root.FindChild("panel/dynamic/name").GetComponent <InputField>();
     m_gender0 = m_root.FindChild("panel/dynamic/gender/0").GetComponent <Toggle>();
     m_gender1 = m_root.FindChild("panel/dynamic/gender/1").GetComponent <Toggle>();
     m_tabIcon = UITab.Get(m_root.FindChild("panel/dynamic/icon").gameObject);
     m_btnOk   = m_root.FindChild("panel/dynamic/btn_ok").gameObject;
 }
Example #2
0
        public static UITab Get(GameObject go)
        {
            UITab load = go.GetComponent <UITab>();

            if (load == null)
            {
                load = go.AddComponent <UITab>();
            }
            if (!load.m_init)
            {
                load.Init();
            }
            return(load);
        }