Hi Guillaume
Thanks for reporting this issue.
I am having trouble reproducing the issue. I first just spammed the scene with tens of generators generating thousands of meshes, but the Awake method took less than 10ms. Digging deeper, I saw that the meshFilter.sharedMesh != null condition is always false, thus the FindObjectsOfType method is never called. This is because the sharedMesh can be != null only if the object was reused, meaning taken from a pool. But pools are ignored in edit mode, and this awake code runs only in edit mode. So I am confused about how you managed to reproduce the issue. Did you modify Curvy's code? Please send me any information that would allow me to reproduce the issue.
About your suggestions to avoid calling FindObjectsOfType, they might be good solutions. The DuplicateEditorMesh was created by my predecessor, and I don't doubt that there are better ways to solve the issue he was trying to solve. I can give a better answer once I know how to reproduce the issue.
Thanks again, and have a nice day
Thanks for reporting this issue.
I am having trouble reproducing the issue. I first just spammed the scene with tens of generators generating thousands of meshes, but the Awake method took less than 10ms. Digging deeper, I saw that the meshFilter.sharedMesh != null condition is always false, thus the FindObjectsOfType method is never called. This is because the sharedMesh can be != null only if the object was reused, meaning taken from a pool. But pools are ignored in edit mode, and this awake code runs only in edit mode. So I am confused about how you managed to reproduce the issue. Did you modify Curvy's code? Please send me any information that would allow me to reproduce the issue.
About your suggestions to avoid calling FindObjectsOfType, they might be good solutions. The DuplicateEditorMesh was created by my predecessor, and I don't doubt that there are better ways to solve the issue he was trying to solve. I can give a better answer once I know how to reproduce the issue.
Thanks again, and have a nice day
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.