Whenever I open a prefab that’s been marked as Addressable and make any change to a field in the Inspector, the Editor beachballs for a long time. This makes editing prefabs very slow and painful. If I want to change the position a piece of UI, for example, I have to wait however long it takes for whatever the Addressables system is doing in the background x # operations needed to edit the prefab (which can be a lot if I need to change anchor position, pivot, alignment etc). I think this is because prefabs autosave any changes you try to make. I haven’t been able to find a way to turn this feature off.
I can work around it by dragging the prefab into a scene, making the changes, then applying, but I’d much rather be able to edit the prefab directly. Sometimes the apply button messes up the transforms of the prefab, particularly if it’s UI.
Another workaround is to unmark it as Addressable, do the edits, then remark it as Addressable. But it becomes tedious having to record the address and the Addressable Group the asset is from, make my changes, and mark it as addressable, paste the address back in, and then drag it back into the right Addressable Group.
Is there some better way of getting around this? What is causing changes to addressable prefabs to be so slow?
This is the first I’ve heard of such an egregious performance issue when editing prefabs. Sounds very painful though. Would you mind submitting a bug and attaching your project to it so we can have that to reproduce? We’re working to improve performance across the board so it sounds like this is another piece in that story.
I unfortunately can’t attach the project as it’s proprietary. I tried creating a sample project but I think the performance issue can only be seen in a large project with many assets. However, I managed to do some profiling and I found this was happening every time I made a change to an Addressable prefab.
As you can see, the ExecuteAll call took quite a long time. I enabled Deep Profile and found that something in the asset system was doing a lot of string operations on asset labels (3 lines above the highlighted function you can see “ParseMetadataFromAssetLabels”).
The call stack looks like a deeper engine issue that the asset database team might need to look at. Please submit a bug with the profiler screenshots, so that QA can process the issue and send it to the right team.
Also, for anyone else that also has this problem, I found an older thread from 2020 that seems to have the exact same problem (not sure if they’re also using Addressables), and they found another good workaround. When you open a prefab, there’s another Autosave option, separate from the one in Preferences, that you can disable. It is located here. Disable that, and it will no longer save and trigger the asset reimport issues every time you make a change.
This isn’t a solution to the main problem, which is that modifying one singular prefab causes a reimport of all prefabs, but it will at least reduce the problem to only having to do it once when you decide to save your changes.