fix: GetSourceText空引用异常 - 翻译表值可能为null

This commit is contained in:
ayuan9957 2026-07-16 14:52:10 +08:00
parent c1280b9c65
commit 86370f9417

View File

@ -688,9 +688,10 @@ public class LocalizationManager : MonoBehaviour
foreach (KeyValuePair<string, string[]> pair in table)
{
if (pair.Value == null) continue;
for (int i = 1; i < pair.Value.Length; i++)
{
if (pair.Value[i] == value) return pair.Key;
if (pair.Value[i] != null && pair.Value[i] == value) return pair.Key;
}
}