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>(); }
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>(); }