using System; using UnityEngine; namespace BaseGames.UI.Settings { /// /// 设置面板的数据驱动表(策划编辑)。 /// 按顺序列出设置项与分节标题; 据此生成对应控件行。 /// 策划可在 Inspector 增删、重排、改标签、加分节,无需改代码或重编译。 /// [CreateAssetMenu(menuName = "BaseGames/UI/Settings Schema", fileName = "UI_SettingsSchema")] public class SettingsSchemaSO : ScriptableObject { [Serializable] public struct Item { [Tooltip("勾选则为分节标题行(仅显示 labelKey,不绑定控件)。")] public bool isHeader; [Tooltip("标签本地化 Key(UI 表)。")] public string labelKey; [Tooltip("绑定的设置项(isHeader 为 true 时忽略)。")] public SettingKey key; } [SerializeField] private Item[] _items; public Item[] Items => _items; } }