01-17-2022, 02:15 PM
Hi _Aka_!
Thanks so much for your answers!
I should have added more markers to this Awake method, I was pretty sure that FindObjectsOfType was taking all the time, but I forgot all the things done in the Unity operators!
(but I think FindObjectsOfType will still garbage a lot. I still need to verify before saying wrong things again!)
The issue was happening when opening a scene, or switching back from play to edit mode.
I didn't modified Curvy heavily, just commented a line (and maybe that's the cause of the issue I realize that now, but I really think I have 700 legit DuplicateEditorMesh in my scene):
Thanks so much for your answers!
I should have added more markers to this Awake method, I was pretty sure that FindObjectsOfType was taking all the time, but I forgot all the things done in the Unity operators!
(but I think FindObjectsOfType will still garbage a lot. I still need to verify before saying wrong things again!)
The issue was happening when opening a scene, or switching back from play to edit mode.
I didn't modified Curvy heavily, just commented a line (and maybe that's the cause of the issue I realize that now, but I really think I have 700 legit DuplicateEditorMesh in my scene):
Code:
if (firstChanged != null)
{
#if UNITY_EDITOR
DEBUG_ExecutionTime.Stop();
if (!Application.isPlaying)
{
// >>>>>>>>>> COMMENTED THIS LINE, because calling that from every Generator was showing it in the profiler, like a lot (I don't remember the duration)
//EditorUtility.UnloadUnusedAssetsImmediate(); //OPTIM is this necessary? It was added in changeset SHA-1: 4b04d2ea947cdb84fdc45f07f3e5cbf7b9531c94
}
#endif
OnRefreshEvent(new CurvyCGEventArgs(this, firstChanged));
}