AlicizaX/Client/Packages/com.alicizax.unity.ui/Editor/UIConfig/UIGenerateGlobalSettingTab.cs
2025-01-26 20:55:39 +08:00

36 lines
1.0 KiB
C#

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<UIGenerateGlobalSettings>();
}
protected override void Save()
{
base.Save();
EditorUtility.SetDirty(UIGenerateGlobalSettings);
AssetDatabase.SaveAssets();
}
}
}