示例#1
0
 protected override void Awake()
 {
     base.Awake();
     base.transition       = Transition.None;
     base.toggleTransition = ToggleTransition.None;
     this.m_Accordion      = this.gameObject.GetComponentInParent <UIAccordion>();
     this.m_RectTransform  = this.transform as RectTransform;
     this.m_LayoutElement  = this.gameObject.GetComponent <LayoutElement>();
     this.onValueChanged.AddListener(OnValueChanged);
 }
		protected override void Awake()
		{
			base.Awake();
			base.transition = Transition.None;
			base.toggleTransition = ToggleTransition.None;
			this.m_Accordion = this.gameObject.GetComponentInParent<UIAccordion>();
			this.m_RectTransform = this.transform as RectTransform;
			this.m_LayoutElement = this.gameObject.GetComponent<LayoutElement>();
			this.onValueChanged.AddListener(OnValueChanged);
            if (this.isOn)
                this.m_Accordion.activeAccrodionElement = this.m_RectTransform;
            this.onValueChanged.AddListener(OnValueChanged);
		}
示例#3
0
 public void SetAccordion()
 {
     this.m_Accordion = this.gameObject.GetComponentInParent <UIAccordion>();
     OnValidate();
 }