구글 시트 -> 유니티 현지화 완전 덮어씌우기로 변경
This commit is contained in:
parent
9fda677d2c
commit
6c841577f9
@ -38,14 +38,15 @@ public static async void ImportAllFromSheet(string webAppUrl)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
var shared = collection.SharedData;
|
collection.ClearAllEntries();
|
||||||
EditorUtility.SetDirty(shared); // ✅ SharedData 저장 대상 표시
|
EditorUtility.SetDirty(collection.SharedData);
|
||||||
|
EditorUtility.SetDirty(collection);
|
||||||
|
|
||||||
foreach (var row in rows)
|
foreach (var row in rows)
|
||||||
{
|
{
|
||||||
if (!row.TryGetValue("Key", out var key) || string.IsNullOrEmpty(key)) continue;
|
if (!row.TryGetValue("Key", out var key) || string.IsNullOrEmpty(key)) continue;
|
||||||
|
|
||||||
var sharedEntry = shared.GetEntry(key) ?? shared.AddKey(key);
|
var sharedEntry = collection.SharedData.AddKey(key);
|
||||||
|
|
||||||
foreach (var localeCode in row.Keys)
|
foreach (var localeCode in row.Keys)
|
||||||
{
|
{
|
||||||
@ -59,7 +60,7 @@ public static async void ImportAllFromSheet(string webAppUrl)
|
|||||||
}
|
}
|
||||||
|
|
||||||
table.AddEntry(sharedEntry.Id, row[localeCode]);
|
table.AddEntry(sharedEntry.Id, row[localeCode]);
|
||||||
EditorUtility.SetDirty(table); // ✅ StringTable 저장 대상 표시
|
EditorUtility.SetDirty(table);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user