using AlicizaX.Editor; using Sirenix.OdinInspector; using UnityEditor; using UnityEngine; namespace AlicizaX.UI.Editor { [System.Serializable] [DisplayName("UI构建设置")] internal sealed class UIGenerateGlobalSettingTab : GameFrameworkTabBase { [Required] [InlineEditor(InlineEditorObjectFieldModes.CompletelyHidden)] [DisableInPlayMode] [HideLabel] public UIGenerateGlobalSettings UIGenerateGlobalSettings; [Sirenix.OdinInspector.Button] private void LogConfig() { foreach (var VARIABLE in UIGenerateGlobalSettings.UIElementRegexConfigs) { Debug.Log(VARIABLE.componentType); } } public UIGenerateGlobalSettingTab() { UIGenerateGlobalSettings = ScriptableSingletonUtil.Get(); } protected override void Save() { base.Save(); EditorUtility.SetDirty(UIGenerateGlobalSettings); AssetDatabase.SaveAssets(); } } }