private void UpdateLayersList() { List <DataLayer> layers = Group?.layers; layerDropdown.onValueChanged.RemoveListener(OnLayerDropdownChanged); layerDropdown.SetOptions(layers, (item) => item.Name); layerDropdown.onValueChanged.AddListener(OnLayerDropdownChanged); UpdateProgress(); }
private void UpdatePanelUI() { var sites = dataManager.sites; siteDropdown.onValueChanged.RemoveListener(OnSiteDropdownChanged); siteDropdown.SetOptions(sites, (item) => item.Name); siteDropdown.onValueChanged.AddListener(OnSiteDropdownChanged); var groups = dataManager.groups; groupDropdown.onValueChanged.RemoveListener(OnGroupDropdownChanged); groupDropdown.SetOptions(groups, (item) => item.name); groupDropdown.onValueChanged.AddListener(OnGroupDropdownChanged); resolutionDropdown.OnItemCreated -= OnResolutionDropdownItemCreated; resolutionDropdown.OnItemCreated += OnResolutionDropdownItemCreated; resolutionDropdown.onValueChanged.RemoveListener(OnResolutionDropdownChanged); resolutionDropdown.SetOptions(resolutions, (item) => Translator.Get(item.name, false)); resolutionDropdown.onValueChanged.AddListener(OnResolutionDropdownChanged); UpdateLayersList(); }