I have just written an Editor script to reparent game objects and I find that it is performing very poorly.
I am using the following code:
foreach(GameObject obj in gameObjectsToReparent)
{
obj.transform.parent = newParentGameObject;
}
For 190 game objects the above loop takes an average of 16s. I find it to be rather slow but maybe reparenting a game object involves a lot of work in the background.
Am I doing something stupid in my code? Is this kind of performance to be expected?