コード例 #1
0
            void UpdateActionButtonsState()
            {
                var isPanelEnabled = m_SelectedConfiguration != null &&
                                     m_FilteredBuildConfigurationViewModels.Contains(m_SelectedConfiguration) &&
                                     m_SelectedConfiguration.IsLiveLinkCompatible;

                if (isPanelEnabled)
                {
                    m_ActionButtons.SetEnabled(true);
                    var isEnabled = m_SelectedConfiguration.IsActionAllowed(m_StartModeDropdown.value, out var reason);
                    m_StartButton.SetEnabled(isEnabled);
                    m_StartButton.parent.tooltip = isEnabled ? string.Empty : reason;
                }
                else
                {
                    m_ActionButtons.SetEnabled(false);
                }
            }