本地化

This commit is contained in:
2025-04-25 20:24:11 +08:00
parent 165d154784
commit d69ad072ea
127 changed files with 12788 additions and 1647 deletions
+17 -1
View File
@@ -1,3 +1,6 @@
using AibisDream.Framework;
using UnityEngine.Localization.Settings;
namespace AibisDream.Kit
{
public class Character
@@ -47,7 +50,20 @@ namespace AibisDream.Kit
/// <returns></returns>
public string GetActorName()
{
return string.IsNullOrEmpty(nameColor) ? cn : $"<color={nameColor}>{cn}</color>";
string rawName;
// 人名部分直接为空
if (string.IsNullOrWhiteSpace(key))
{
rawName = "";
}
else
{
// 人名能找到
var entry = LocalizationKit.ActorTableName[key];
rawName = entry == null ? key : entry.LocalizedValue;
}
return string.IsNullOrEmpty(nameColor) ? rawName : $"<color={nameColor}>{rawName}</color>";
}
public string VoicePath