コード例 #1
0
 private void getComponent( )
 {
     _myTransform     = this.transform;
     _container       = _myTransform.Find("Container");
     toggle           = _container.Find("Toggle").GetComponent <Toggle>();
     icon             = _container.Find("IconContainer/Icon").GetComponent <Image>();
     text             = _container.Find("Text").GetComponent <Text>();
     _toggleTransform = toggle.transform.Find("Image");
     UITree           = _myTransform.parent.parent.parent.GetComponent <UITree>();
 }
コード例 #2
0
ファイル: UITreeNode.cs プロジェクト: YaoGaoShang/NTProject
 private void getComponent( )
 {
     _myTransform = this.transform;
     _container   = _myTransform.Find("Container");
     toggle       = _container.Find("Toggle").GetComponent <Toggle>();
     icon         = _container.Find("IconContainer/Icon").GetComponent <Image>();
     text         = _container.Find("Text").GetComponent <Text>();
     // text.gameObject.AddComponent<SelectImage>().inistatePrefab=SelectObjManager.Instance.instantiateObj[0];//添加
     _toggleTransform = toggle.transform.Find("Image");
     UITree           = _myTransform.parent.parent.parent.GetComponent <UITree>();
 }