In Unity 2019.1, it takes around 5 seconds each time you change a material’s parameter (from a texture to even changing the color of the albedo!!!), during which the editor freezes and you have to wait. This is a HUGE regression from previous versions, where it would immediately update as you changed it. Not sure what could be causing it as everything worked fine before we updated
Hi, Could you please file a bug report?
Done, filed 1172218
Hmm it may be tricky to do much with that bug report without an example project. Does this problem happen in an empty project? It could be linked to the size of your project or editor scripts you may have running in the project.
It doesn’t, our project is pretty large and has a lot of assets. I can post a link to a download of the project in the bug report, if it would help
Hmm may not be a bug then. Can you try using the profiler in Edit mode to see what is taking so much time?
Do you have any editor scripts running in the background or any AssetPostProcessors etc?
Ah I didn’t even think of that, so I went ahead and profiled it
The lag seems to occur due to MaterialEditor.OnEnable() → GC.Alloc:
I am experiencing a variation on this as well. 2019.3.f1. I have been editing blendshapes and making some useful tools. Some of which could be amazingly useful at runtime.
However, the method
Mesh.GetBlendShapeFrameVertices() is very slow. It locks everything up for around 15 seconds per blendshape.
The Project this is in isn’t something easy to share. If this is not resolved soon I’ll try to write a project just to simply demonstrate this.
Added details. The recent example of this that I encountered I was writing a method to grab the vertices and bake in the delta based upon the weight on the skinned mesh renderer before removing the blendshapes. This enables using blendshapes to alter the mesh and then bake in the results without needing the blendshapes any longer so ClearBlendShapes can then be used and the results of the blends are still retained. It works fine. However that single GetBlendShapeFrameVertices() command has been the bottleneck and is very slow. I’ve also played around with passing null for the deltaNormals and deltaTangents parameters to see if that increased the speed. It did not seem to make much of a difference.