void Start() { var dropdownDispatcher = Type.GetType($"GUI.DropdownScripts.{name}Script"); if (dropdownDispatcher == null) { Debug.Log($"Cannot find {name}Script"); return; } mainDropdownDispatcher = (DropdownBase)Activator.CreateInstance(dropdownDispatcher, new object[] { UI }); var allButtons = GetComponentsInChildren <Button>(); foreach (var button in allButtons) { button.onClick.AddListener(delegate { ButtonClickedEvent(button.name); }); } }
/// <summary> /// Sets the title of the tab panel with the specified value. /// </summary> /// <param name="dropdown">The value of the title.</param> /// <returns>Current component.</returns> public YimaTabPanel Title(DropdownBase dropdown) { Title(_htmlHelper.BootstrapTabPanelTitle().Title(dropdown)); return(this); }