Hi! I’m having some difficulty getting a string table during editor mode, both async and non async versions return null. Is this possible to do during editor or does it have to be in play mode? Any help would be appreciated, thanks!
Yes this is possible. When in edit mode the selected locale will be null though so calling to get a table won’t work as it won’t know which language you want. You could set the selected locale through script first or do it through the scene controls window. Alternatively if this is an editor only thing then we have an editor only API as well Class LocalizationEditorSettings | Localization | 1.0.5
that worked perfectly. for those who want to know what the code would look like it looks like this.
Off topic but I would like help with the second bit of code in the snippet I posted earlier. Using the code below doesn’t end up creating any table entries, is there anything else I need to do to make sure the table entry is created while in edit mode?
Do you want these changes to persist? A table is an asset so if you make changes you will need to mark it dirty so Unity knows that the asset has changed. EditorUtility.SetDirty. Set the table and the SharedTableData dirty.
Also for GetLocale you can just do GetLocale(“en”); You dont need to do new LocaleIdentifier.
The async operation that is returned can be yielded on, so you dont need to do the while is not done. Just do yield return st; It will return when it is completed.
Yes I would like the changes to persist. I did what you mentioned and I’m still not seeing the new entries populate the string table, am I doing anything else wrong?



Hmm that should work. What play mode do you have enabled in Addressables? It may be using the string tables from asset bundles in which case you can’t make changes, they are immutable. Are you able to use the LocalizationEditorSettings class instead?
Are these changes also being made in the player build?
Could you give me some more details on how to check which play mode I have enabled in Addressables please! I will look into using the LocalizationEditorSettings right now. No they’re just being made in editor.
Edit: Alright I got things working with LocalizationEditorSettings I think! One last question can I get an ID for a key? I’m trying to get if it contains the key already to just modify the existing value but I don’t have id for it.
The shared table data contains all the keys and IDs. Get the shared table entry with either and you will have access to both.


