I need to be able to summon an exact copy of a set of objects (grouped by a common parent), but quickly adjust them so they can serve their purpose before they get any chance to interact with the world or run Start() in any of the scripts the original objects have.
So, basically, now it looks kinda like this (the code is run in a script attached to one of those objects):
transform copiedParent = Instantiate(commonParent,position,rotation);
foreach (Transform Child in copiedParent)
{
//destroy some children of Child
//destroy colliders and old scripts of Child
//add a script to Child
//only now should the child actually come to life
}
The ideal scenario would be to have a virtual, nonexistent copy of the original common parent (like… creating a short-lived prefab at runtime?), adjust it and then instantiate it, but I don’t think it’s possible.
Another possibility would be to stop Start() from running in any of the scripts on my copied objects until their adjustment is finished. Colliders being destroyed too late should not be that big of a problem.