UI系统优化

This commit is contained in:
2026-05-25 11:54:37 +08:00
parent c7057db27d
commit 3c812cfb41
130 changed files with 4738 additions and 477 deletions

View File

@@ -0,0 +1,42 @@
using System.Collections.Generic;
namespace BaseGames.Localization
{
/// <summary>
/// 标记一个 ScriptableObject 持有可本地化字段。
/// 实现此接口后,<see cref="BaseGames.Editor.Modules.LocalizationAuditModule"/>
/// 将自动发现并检查该 SO 的所有 Key无需在审计模块中硬编码扫描逻辑。
///
/// 新增 SO 类型时:实现此接口即可自动纳入本地化审计,不需要修改审计模块。
/// </summary>
public interface ILocalizableAsset
{
/// <summary>
/// 返回该资产中所有本地化 Key 的引用列表。
/// 实现时跳过空 key<c>string.IsNullOrEmpty</c> 检查)。
/// </summary>
IEnumerable<LocalizationKeyRef> GetLocalizationKeys();
}
/// <summary>
/// 对一个本地化 Key 引用的描述,供审计工具使用。
/// </summary>
public readonly struct LocalizationKeyRef
{
/// <summary>本地化 Key 字符串。</summary>
public readonly string Key;
/// <summary>所属表名(使用 <see cref="LocalizationTable"/> 常量)。</summary>
public readonly string Table;
/// <summary>该 Key 来自的字段名称,用于审计报告中精确定位。</summary>
public readonly string FieldName;
public LocalizationKeyRef(string key, string table, string fieldName)
{
Key = key;
Table = table;
FieldName = fieldName;
}
}
}