SoftMaskForUGUI icon indicating copy to clipboard operation
SoftMaskForUGUI copied to clipboard

Big performance hit (CPU + GC Alloc) coming from SoftMaskable.UpdateMaterialForSceneView

Open oxysoft opened this issue 4 years ago • 2 comments

image

This is for ~300 SoftMaskables. All of the allocation comes from accessing mat.shader.name, and then there's the "Set view and projection matrices" part as well which takes a decent amount of time. I am aware that function runs only in editor, but this performance hit is still pretty harsh for productivity.

Perhaps you could restrict this function to running only when the SceneView is visible in the editor? Currently, it will run whether the SceneView is visible or not.

oxysoft avatar Mar 10 '21 20:03 oxysoft

@oxysoft Thank you for your reporting!

mob-sakai avatar Mar 11 '21 00:03 mob-sakai

Any update on this?

oxysoft avatar Apr 15 '21 00:04 oxysoft