Hello! Could you please tell me how to refresh the table in the editor?
I opened the localization window, then I update the table with the code below, but to see the information I have to close the localization window and open it again.
This doesn’t help:
EditorUtility.SetDirty(collection);
AssetDatabase.Refresh();
How can I refresh the localization window without closing it?
void Dump()
{
var collection = LocalizationEditorSettings.GetStringTableCollection(collectionName);
for (int i = 0; i < dumpAssets.Count; i++)
{
var obj = dumpAssets[i];
var table = collection.GetTable(obj.identifier) as StringTable;
var entry = table.GetEntry(entryKey);
var loc = obj.GetValue(dumpKey);
if (entry != null)
entry.Value = loc;
else
table.AddEntry(entryKey, loc);
}
//---> It doesn't work.
EditorUtility.SetDirty(collection);
AssetDatabase.Refresh();
}