using System.Collections.Generic; using System.Linq; using UnityEngine.UIElements; namespace UnityEditor.Purchasing { internal abstract class BasePurchasingState : SimpleStateMachine.State { protected List m_UIBlocks; protected BasePurchasingState(string stateName, SimpleStateMachine stateMachine) : base(stateName, stateMachine) { m_UIBlocks = new List { PlatformsAndStoresServiceSettingsBlock.CreateStateSpecificBlock(IsEnabled()), new AnalyticsWarningSettingsBlock() }; } internal List GetStateUI() { return m_UIBlocks.Select(block => block.GetUIBlockElement()).ToList(); } internal abstract bool IsEnabled(); } }