void Start() { _controlAudio = FindObjectOfType <ControlAudio>(); _toggle = GetComponent <Toggle>(); _M08A050T_BehaviourToggleGroup = transform.parent.GetComponent <M08A050T_BehaviourToggleGroup>(); _managerToggle = transform.parent.parent.GetComponent <M08A050T_ManagerSeleccionarToggle>(); _toggle.onValueChanged.AddListener(delegate { SetStateToggle(); }); }
private void Start() { if (_M08A050T_ManagerSeleccionarToggle) { _M08A050T_ManagerSeleccionarToggle = transform.parent.GetComponent <M08A050T_ManagerSeleccionarToggle>(); _M08A050T_ManagerSeleccionarToggle._groupToggle.Add(this); SetComponentGroupToggle(); } _sizeCorrect = GetSizeCorrect(); }