We have the problem that opening our project sometimes causes the Unity editor to modify existing Localization-String-Tables* AssetGroup’s and to create a whole bunch of new ones.
The “fix” is always to close Unity, discard/delete those magic-files and open Unity again. This always fixes the problem for a while. I believe it most often occurs when someone pulls new content from git.
Is there some code that runs on editor-startup that would do this? Perhaps it’s because the string tables don’t use the default name?
Hmm. Yes we do some stuff when importing assets. We have a system to control what addressables group an asset goes into.
Have you configured an addressables group rules asset? Addressables Integration | Localization | 1.0.5
The idea is to allow you to configure what groups we use whenever we need to update addressables.
If we are creating empty groups then that may be worth a bug report.
I think if you untick the move entries in unknown groups then it may solve the issue.
That is when we are doing the import of a collection. The error seems to be coming from us calling to get the Addressable asset settings - GetAddressableAssetSettings
This is attempting to load an asset
Maybe Addressables hasn’t been initialized when Localization tries to access it? In this particular case, it was a fresh git-clone and first open of the project.
I don’t seem to be able to find a reliable reproduce outside our production project. Any chance you can look into it without a reproduction project?
An useful attempt to fix it might be to defer what the Localization package is doing during the PostprocessAllAssets step to ensure it runs after Addressables.
I really hope initialization order is the issue, because it causes so much issues for us in the team. Would be like a dream come true if it can be sorted out.
We don’t have a fix for it at the moment. Its unlikely to be in the next release as that one is almost ready. I’ll try and look into it once we get the next release out.
I’ve to battle with it almost daily. For example, I just had to remove those automagically created files from version control, because someone committed them by accident.
Do you have some steps that reproduce the issue. I have not had a chance to look into this one yet but any extra information you can provide will help.
Unfortunately I don’t, because it occurs randomly. I believe the project requires a certain complexity in sense of number of assets and Addressables asset-groups in the project.
The issue most often triggers when I clone our git repository and open the fresh copy. But it also triggers when pulling new content in an existing repo, but it does not trigger that often in this case.
I can see that Addressables also has an AssetPostprocessor step so I suspect that its just the order that they are executed. Can you test a change to see if it fixes the issue for you?
The file I have to change is located in Library\PackageCache\com.unity.localization@1.0.0-pre.10\Editor\Asset Pipeline\LocalizationAssetPostProcessor.cs, but my test would have been to delete the Library directory and let the editor reimport everything. But this file is stored in the Library directory too.
Ah good point
Can you copy the com.unity.localization directory into your Projects directory? It will let you then make changes to it without them being reverted